mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 08:15:46 -05:00
Fix macro selection resetting when any macro was removed
This commit is contained in:
@@ -76,12 +76,16 @@ void MacroSelection::ShowAllMacros()
|
||||
|
||||
void MacroSelection::MacroRemove(const QString &name)
|
||||
{
|
||||
const bool currentSelectionWasRemoved = name == currentText();
|
||||
|
||||
int idx = findText(name);
|
||||
if (idx == -1) {
|
||||
return;
|
||||
}
|
||||
removeItem(idx);
|
||||
setCurrentIndex(-1);
|
||||
if (currentSelectionWasRemoved) {
|
||||
setCurrentIndex(-1);
|
||||
}
|
||||
}
|
||||
|
||||
void MacroSelection::MacroRename(const QString &oldName, const QString &newName)
|
||||
|
||||
Reference in New Issue
Block a user