mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 18:04:59 -05:00
26 lines
538 B
C++
26 lines
538 B
C++
#include "window-selection.hpp"
|
|
#include "selection-helpers.hpp"
|
|
|
|
namespace advss {
|
|
|
|
WindowSelectionWidget::WindowSelectionWidget(QWidget *parent)
|
|
: FilterComboBox(parent)
|
|
{
|
|
setEditable(true);
|
|
SetAllowUnmatchedSelection(true);
|
|
setMaxVisibleItems(20);
|
|
PopulateWindowSelection(this);
|
|
}
|
|
|
|
void WindowSelectionWidget::showEvent(QShowEvent *event)
|
|
{
|
|
FilterComboBox::showEvent(event);
|
|
const QSignalBlocker b(this);
|
|
const auto text = currentText();
|
|
clear();
|
|
PopulateWindowSelection(this);
|
|
setCurrentText(text);
|
|
}
|
|
|
|
} // namespace advss
|