fix: Copy Shortcut Not Working In Reply Thread Popup (#4209)

This commit is contained in:
nerix
2022-12-03 14:02:39 +01:00
committed by GitHub
parent 6ee7ef8cab
commit 8d4ee72478
8 changed files with 31 additions and 14 deletions
+7 -5
View File
@@ -33,14 +33,16 @@
namespace chatterino {
SplitInput::SplitInput(Split *_chatWidget, bool enableInlineReplying)
: SplitInput(_chatWidget, _chatWidget, enableInlineReplying)
: SplitInput(_chatWidget, _chatWidget, _chatWidget->view_,
enableInlineReplying)
{
}
SplitInput::SplitInput(QWidget *parent, Split *_chatWidget,
bool enableInlineReplying)
ChannelView *_channelView, bool enableInlineReplying)
: BaseWidget(parent)
, split_(_chatWidget)
, channelView_(_channelView)
, enableInlineReplying_(enableInlineReplying)
{
this->installEventFilter(this);
@@ -562,7 +564,7 @@ void SplitInput::addShortcuts()
if (copyFromSplit)
{
this->split_->copyToClipboard();
this->channelView_->copySelectedText();
}
else
{
@@ -641,9 +643,9 @@ void SplitInput::installKeyPressedEvent()
if ((event->key() == Qt::Key_C || event->key() == Qt::Key_Insert) &&
event->modifiers() == Qt::ControlModifier)
{
if (this->split_->view_->hasSelection())
if (this->channelView_->hasSelection())
{
this->split_->copyToClipboard();
this->channelView_->copySelectedText();
event->accept();
}
}