mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix selection clearing not working in Reply window (#4218)
Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
e68a3fcd30
commit
a16d148dfd
|
@ -11,6 +11,7 @@
|
|||
- Bugfix: Fixed CTRL + C not working in reply thread popups. (#4209)
|
||||
- Bugfix: Fixed message input showing as red after removing a message that was more than 500 characters. (#4204)
|
||||
- Bugfix: Fixed unnecessary saving of windows layout. (#4201)
|
||||
- Bugfix: Fixed Reply window missing selection clear behaviour between chat and input box. (#4218)
|
||||
- Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198)
|
||||
|
||||
## 2.4.0
|
||||
|
|
|
@ -89,6 +89,22 @@ ReplyThreadPopup::ReplyThreadPopup(bool closeAutomatically, QWidget *parent,
|
|||
this->updateInputUI();
|
||||
}));
|
||||
|
||||
// clear SplitInput selection when selecting in ChannelView
|
||||
this->ui_.threadView->selectionChanged.connect([this]() {
|
||||
if (this->ui_.replyInput->hasSelection())
|
||||
{
|
||||
this->ui_.replyInput->clearSelection();
|
||||
}
|
||||
});
|
||||
|
||||
// clear ChannelView selection when selecting in SplitInput
|
||||
this->ui_.replyInput->selectionChanged.connect([this]() {
|
||||
if (this->ui_.threadView->hasSelection())
|
||||
{
|
||||
this->ui_.threadView->clearSelection();
|
||||
}
|
||||
});
|
||||
|
||||
layout->setSpacing(0);
|
||||
// provide draggable margin if frameless
|
||||
auto marginPx = closeAutomatically ? 15 : 1;
|
||||
|
|
|
@ -115,6 +115,7 @@ Split::Split(QWidget *parent)
|
|||
});
|
||||
this->updateInputPlaceholder();
|
||||
|
||||
// clear SplitInput selection when selecting in ChannelView
|
||||
this->view_->selectionChanged.connect([this]() {
|
||||
if (this->input_->hasSelection())
|
||||
{
|
||||
|
@ -122,6 +123,14 @@ Split::Split(QWidget *parent)
|
|||
}
|
||||
});
|
||||
|
||||
// clear ChannelView selection when selecting in SplitInput
|
||||
this->input_->selectionChanged.connect([this]() {
|
||||
if (this->view_->hasSelection())
|
||||
{
|
||||
this->view_->clearSelection();
|
||||
}
|
||||
});
|
||||
|
||||
this->view_->openChannelIn.connect([this](
|
||||
QString twitchChannel,
|
||||
FromTwitchLinkOpenChannelIn openIn) {
|
||||
|
|
|
@ -155,12 +155,12 @@ void SplitInput::initLayout()
|
|||
this->clearInput();
|
||||
});
|
||||
|
||||
// clear channelview selection when selecting in the input
|
||||
// Forward selection change signal
|
||||
QObject::connect(this->ui_.textEdit, &QTextEdit::copyAvailable,
|
||||
[this](bool available) {
|
||||
if (available)
|
||||
{
|
||||
this->split_->view_->clearSelection();
|
||||
this->selectionChanged.invoke();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -81,6 +81,7 @@ public:
|
|||
bool isHidden() const;
|
||||
|
||||
pajlada::Signals::Signal<const QString &> textChanged;
|
||||
pajlada::Signals::NoArgSignal selectionChanged;
|
||||
|
||||
protected:
|
||||
void scaleChangedEvent(float scale_) override;
|
||||
|
|
Loading…
Reference in a new issue