mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 00:05:41 -05:00
Cleanup
* Use GetSettingsWindow() instead of window() to avoid connecting to the wrong widget * Fix typos
This commit is contained in:
@@ -11,10 +11,14 @@ namespace advss {
|
||||
MacroRunButton::MacroRunButton(QWidget *parent) : QPushButton(parent)
|
||||
{
|
||||
installEventFilter(this);
|
||||
auto parentWindow = window();
|
||||
if (parentWindow) {
|
||||
parentWindow->installEventFilter(this);
|
||||
}
|
||||
|
||||
// GetSettingsWindow() might still return null while this constructor is called
|
||||
QTimer::singleShot(0, this, [this]() {
|
||||
auto parentWindow = GetSettingsWindow();
|
||||
if (parentWindow) {
|
||||
parentWindow->installEventFilter(this);
|
||||
}
|
||||
});
|
||||
|
||||
setToolTip(obs_module_text("AdvSceneSwitcher.macroTab.run.tooltip"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user