mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Use loader for machine actions in dialog
CURA-6495
This commit is contained in:
parent
c9e7f3a245
commit
53d595f698
5 changed files with 27 additions and 23 deletions
|
@ -100,10 +100,11 @@ UM.ManagementPage
|
|||
text: machineActionRepeater.model[index].label
|
||||
onClicked:
|
||||
{
|
||||
actionDialog.content = machineActionRepeater.model[index].displayItem;
|
||||
machineActionRepeater.model[index].displayItem.reset();
|
||||
actionDialog.title = machineActionRepeater.model[index].label;
|
||||
actionDialog.show();
|
||||
var currentItem = machineActionRepeater.model[index]
|
||||
actionDialog.loader.manager = currentItem
|
||||
actionDialog.loader.source = currentItem.qmlPath
|
||||
actionDialog.title = currentItem.label
|
||||
actionDialog.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,13 +114,7 @@ UM.ManagementPage
|
|||
UM.Dialog
|
||||
{
|
||||
id: actionDialog
|
||||
property var content
|
||||
onContentChanged:
|
||||
{
|
||||
contents = content;
|
||||
content.onCompleted.connect(hide)
|
||||
content.dialog = actionDialog
|
||||
}
|
||||
|
||||
rightButtons: Button
|
||||
{
|
||||
text: catalog.i18nc("@action:button", "Close")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue