some more stuff

This commit is contained in:
fourtf 2020-08-13 20:20:24 +02:00
parent a566a74ef0
commit 46361ea859
2 changed files with 9 additions and 1 deletions

View file

@ -60,7 +60,8 @@ void QuickSwitcherPopup::initWidgets()
auto vbox = creator.setLayoutType<QVBoxLayout>(); auto vbox = creator.setLayoutType<QVBoxLayout>();
{ {
vbox.emplace<QLineEdit>().assign(&this->ui_.searchEdit); auto lineEdit = vbox.emplace<QLineEdit>().assign(&this->ui_.searchEdit);
lineEdit->setPlaceholderText("Jump to a channel or open a new one");
QObject::connect(this->ui_.searchEdit, &QLineEdit::textChanged, this, QObject::connect(this->ui_.searchEdit, &QLineEdit::textChanged, this,
&QuickSwitcherPopup::updateSuggestions); &QuickSwitcherPopup::updateSuggestions);

View file

@ -230,6 +230,13 @@ void SplitContainer::addSplit(Split *split)
void SplitContainer::setSelected(Split *split) void SplitContainer::setSelected(Split *split)
{ {
// safety
if (std::find(this->splits_.begin(), this->splits_.end(), split) ==
this->splits_.end())
{
return;
}
this->selected_ = split; this->selected_ = split;
if (Node *node = this->baseNode_.findNodeContainingSplit(split)) if (Node *node = this->baseNode_.findNodeContainingSplit(split))