mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-27 11:45:34 -05:00
Fix crashes related to widget highlighting
This commit is contained in:
@@ -170,8 +170,10 @@ void AdvSceneSwitcher::on_sceneGroupAdd_clicked()
|
||||
item->setData(Qt::UserRole, text);
|
||||
ui->sceneGroups->setCurrentItem(item);
|
||||
|
||||
addPulse->deleteLater();
|
||||
addPulse = nullptr;
|
||||
if (addPulse) {
|
||||
addPulse->deleteLater();
|
||||
addPulse = nullptr;
|
||||
}
|
||||
ui->sceneGroupHelp->setVisible(false);
|
||||
|
||||
emit SceneGroupAdded(QString::fromStdString(name));
|
||||
|
||||
@@ -100,8 +100,10 @@ void AdvSceneSwitcher::on_macroAdd_clicked()
|
||||
}
|
||||
|
||||
ui->macros->Add(newMacro);
|
||||
addPulse->deleteLater();
|
||||
addPulse = nullptr;
|
||||
if (addPulse) {
|
||||
addPulse->deleteLater();
|
||||
addPulse = nullptr;
|
||||
}
|
||||
emit MacroAdded(QString::fromStdString(name));
|
||||
}
|
||||
|
||||
@@ -1218,8 +1220,10 @@ void AdvSceneSwitcher::CopyMacro()
|
||||
Macro::PrepareMoveToGroup(macro->Parent(), newMacro);
|
||||
|
||||
ui->macros->Add(newMacro, macro);
|
||||
addPulse->deleteLater();
|
||||
addPulse = nullptr;
|
||||
if (addPulse) {
|
||||
addPulse->deleteLater();
|
||||
addPulse = nullptr;
|
||||
}
|
||||
emit MacroAdded(QString::fromStdString(name));
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ void MacroTreeItem::Update(bool force)
|
||||
_spacer = nullptr;
|
||||
}
|
||||
|
||||
if (_type == Type::Group) {
|
||||
if (_type == Type::Group && _expand) {
|
||||
_boxLayout->removeWidget(_expand);
|
||||
_expand->deleteLater();
|
||||
_expand = nullptr;
|
||||
|
||||
@@ -154,6 +154,7 @@ void StatusControl::SetStarted()
|
||||
_status->setText(obs_module_text("AdvSceneSwitcher.status.active"));
|
||||
if (_pulse) {
|
||||
_pulse->deleteLater();
|
||||
_pulse = nullptr;
|
||||
}
|
||||
SetStatusStyleSheet(false);
|
||||
_setToStopped = false;
|
||||
|
||||
Reference in New Issue
Block a user