Connect compare-and-safe profile dialog buttons to actions.

Some rework was needed as to not get the entire Preferences window to show up, which previously came along with the add profile action.

part of CURA-9347
This commit is contained in:
Remco Burema 2022-11-30 18:48:07 +01:00
parent c13deba1ea
commit 8f65af61e5
4 changed files with 38 additions and 23 deletions

View file

@ -15,7 +15,7 @@ UM.Dialog
property alias state: alternateStates.state
onAccepted: alternateStates.state == "" ? CuraApplication.discardOrKeepProfileChangesClosed("discard") : Cura.Actions.addProfile.trigger()
onRejected: alternateStates.state == "" ? CuraApplication.discardOrKeepProfileChangesClosed("keep") : Cura.Actions.addProfile.trigger()
onRejected: alternateStates.state == "" ? CuraApplication.discardOrKeepProfileChangesClosed("keep") : Cura.Actions.updateProfile.trigger()
minimumWidth: UM.Theme.getSize("popup_dialog").width
minimumHeight: UM.Theme.getSize("popup_dialog").height
@ -160,6 +160,7 @@ UM.Dialog
{
// Workaround: If this placeholder isn't in here, then on repeated state-changes of the window, the rightButtons will be in the center (despite initially showing up right).
visible: alternateStates.state != ""
color: base.backgroundColor
implicitHeight: UM.Theme.getSize("combobox").height
implicitWidth: UM.Theme.getSize("combobox").width
}