Fix macro selection resetting when any macro was removed

This commit is contained in:
WarmUpTill
2025-06-10 21:54:13 +02:00
committed by WarmUpTill
parent 79a8ad57af
commit be6bc48231

View File

@@ -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)