mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-24 06:48:24 -05:00
Add MacroSegmentOrderChanged() signal
This commit is contained in:
parent
6617c08b89
commit
ee5038106a
|
|
@ -87,6 +87,7 @@ signals:
|
|||
void MacroAdded(const QString &name);
|
||||
void MacroRemoved(const QString &name);
|
||||
void MacroRenamed(const QString &oldName, const QString &newName);
|
||||
void MacroSegmentOrderChanged();
|
||||
void HighlightMacrosChanged(bool value);
|
||||
void HighlightActionsChanged(bool value);
|
||||
void HighlightConditionsChanged(bool value);
|
||||
|
|
|
|||
|
|
@ -188,6 +188,7 @@ void AdvSceneSwitcher::AddMacroAction(int idx)
|
|||
SetActionData(*macro);
|
||||
}
|
||||
HighlightAction(idx);
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::on_actionAdd_clicked()
|
||||
|
|
@ -198,10 +199,6 @@ void AdvSceneSwitcher::on_actionAdd_clicked()
|
|||
}
|
||||
|
||||
if (currentActionIdx == -1) {
|
||||
auto macro = getSelectedMacro();
|
||||
if (!macro) {
|
||||
return;
|
||||
}
|
||||
AddMacroAction((int)macro->Actions().size());
|
||||
} else {
|
||||
AddMacroAction(currentActionIdx + 1);
|
||||
|
|
@ -234,6 +231,7 @@ void AdvSceneSwitcher::RemoveMacroAction(int idx)
|
|||
}
|
||||
MacroActionSelectionChanged(-1);
|
||||
lastInteracted = MacroSection::ACTIONS;
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::on_actionRemove_clicked()
|
||||
|
|
@ -286,6 +284,7 @@ void AdvSceneSwitcher::SwapActions(Macro *m, int pos1, int pos2)
|
|||
actionsList->Insert(pos1, widget2);
|
||||
actionsList->Insert(pos2, widget1);
|
||||
SetActionData(*m);
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::MoveMacroActionUp(int idx)
|
||||
|
|
@ -360,4 +359,5 @@ void AdvSceneSwitcher::MacroActionReorder(int to, int from)
|
|||
SetActionData(*macro);
|
||||
}
|
||||
HighlightAction(to);
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -404,6 +404,7 @@ void AdvSceneSwitcher::AddMacroCondition(int idx)
|
|||
SetConditionData(*macro);
|
||||
}
|
||||
HighlightCondition(idx);
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::on_conditionAdd_clicked()
|
||||
|
|
@ -414,10 +415,6 @@ void AdvSceneSwitcher::on_conditionAdd_clicked()
|
|||
}
|
||||
|
||||
if (currentConditionIdx == -1) {
|
||||
auto macro = getSelectedMacro();
|
||||
if (!macro) {
|
||||
return;
|
||||
}
|
||||
AddMacroCondition((int)macro->Conditions().size());
|
||||
} else {
|
||||
AddMacroCondition(currentConditionIdx + 1);
|
||||
|
|
@ -455,6 +452,7 @@ void AdvSceneSwitcher::RemoveMacroCondition(int idx)
|
|||
}
|
||||
MacroConditionSelectionChanged(-1);
|
||||
lastInteracted = MacroSection::CONDITIONS;
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::on_conditionRemove_clicked()
|
||||
|
|
@ -522,6 +520,7 @@ void AdvSceneSwitcher::SwapConditions(Macro *m, int pos1, int pos2)
|
|||
SetConditionData(*m);
|
||||
widget2->SetRootNode(root);
|
||||
widget1->SetRootNode(false);
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
||||
void AdvSceneSwitcher::MoveMacroConditionUp(int idx)
|
||||
|
|
@ -618,4 +617,5 @@ void AdvSceneSwitcher::MacroConditionReorder(int to, int from)
|
|||
SetConditionData(*macro);
|
||||
}
|
||||
HighlightCondition(to);
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user