mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Add warning to PerObjectSettingsPanel when Print Sequence is set to All at Once
This commit is contained in:
parent
03e9694e32
commit
5fe1de2153
2 changed files with 17 additions and 3 deletions
|
@ -11,6 +11,7 @@ import UM 1.1 as UM
|
||||||
Item {
|
Item {
|
||||||
id: base;
|
id: base;
|
||||||
property int currentIndex: UM.ActiveTool.properties.SelectedIndex;
|
property int currentIndex: UM.ActiveTool.properties.SelectedIndex;
|
||||||
|
property string printSequence: UM.ActiveTool.properties.PrintSequence;
|
||||||
|
|
||||||
width: childrenRect.width;
|
width: childrenRect.width;
|
||||||
height: childrenRect.height;
|
height: childrenRect.height;
|
||||||
|
@ -22,6 +23,14 @@ Item {
|
||||||
|
|
||||||
spacing: UM.Theme.sizes.default_margin.height;
|
spacing: UM.Theme.sizes.default_margin.height;
|
||||||
|
|
||||||
|
Label {
|
||||||
|
width: UM.Theme.sizes.setting.width;
|
||||||
|
wrapMode: Text.Wrap;
|
||||||
|
text: catalog.i18nc("@label", "Per Object Settings behavior may be unexpected when 'Print sequence' is set to 'All at Once'.")
|
||||||
|
color: UM.Theme.colors.text;
|
||||||
|
visible: base.printSequence == "all_at_once"
|
||||||
|
}
|
||||||
|
|
||||||
UM.SettingItem {
|
UM.SettingItem {
|
||||||
id: profileSelection
|
id: profileSelection
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
from UM.Tool import Tool
|
from UM.Tool import Tool
|
||||||
from UM.Scene.Selection import Selection
|
from UM.Scene.Selection import Selection
|
||||||
|
from UM.Application import Application
|
||||||
|
|
||||||
from . import PerObjectSettingsModel
|
from . import PerObjectSettingsModel
|
||||||
|
|
||||||
|
@ -10,7 +11,7 @@ class PerObjectSettingsTool(Tool):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.setExposedProperties("Model", "SelectedIndex")
|
self.setExposedProperties("Model", "SelectedIndex", "PrintSequence")
|
||||||
|
|
||||||
def event(self, event):
|
def event(self, event):
|
||||||
return False
|
return False
|
||||||
|
@ -19,6 +20,10 @@ class PerObjectSettingsTool(Tool):
|
||||||
return PerObjectSettingsModel.PerObjectSettingsModel()
|
return PerObjectSettingsModel.PerObjectSettingsModel()
|
||||||
|
|
||||||
def getSelectedIndex(self):
|
def getSelectedIndex(self):
|
||||||
selected_object_id = id(Selection.getSelectedObject(0));
|
selected_object_id = id(Selection.getSelectedObject(0))
|
||||||
index = self.getModel().find("id", selected_object_id)
|
index = self.getModel().find("id", selected_object_id)
|
||||||
return index
|
return index
|
||||||
|
|
||||||
|
def getPrintSequence(self):
|
||||||
|
settings = Application.getInstance().getMachineManager().getActiveProfile()
|
||||||
|
return settings.getSettingValue("print_sequence")
|
Loading…
Add table
Add a link
Reference in a new issue