mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-16 14:19:02 -05:00
Fix crash if previous condition / action was invalid
This commit is contained in:
@@ -610,6 +610,7 @@ void MacroActionTwitchEdit::ActionChanged(int idx)
|
||||
}
|
||||
|
||||
if (idx == -1) { // Reset to previous selection
|
||||
const QSignalBlocker b(_actions);
|
||||
_actions->setCurrentIndex(_actions->findData(
|
||||
static_cast<int>(_entryData->_action)));
|
||||
return;
|
||||
|
||||
@@ -773,6 +773,7 @@ void MacroConditionTwitchEdit::ConditionChanged(int idx)
|
||||
}
|
||||
|
||||
if (idx == -1) { // Reset to previous selection
|
||||
const QSignalBlocker b(_conditions);
|
||||
_conditions->setCurrentIndex(_conditions->findData(
|
||||
static_cast<int>(_entryData->GetCondition())));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user