mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 00:37:50 -06:00
Renamed useOptionalExtruder to addOptional extruder
This is more in line with the other properties CURA-3814
This commit is contained in:
parent
b69ced5766
commit
5aba1731f5
2 changed files with 11 additions and 11 deletions
|
@ -67,7 +67,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||||
self._simple_names = False
|
self._simple_names = False
|
||||||
|
|
||||||
self._active_extruder_stack = None
|
self._active_extruder_stack = None
|
||||||
self._use_optional_extruder = False
|
self._add_optional_extruder = False
|
||||||
|
|
||||||
#Listen to changes.
|
#Listen to changes.
|
||||||
Application.getInstance().globalContainerStackChanged.connect(self._updateExtruders)
|
Application.getInstance().globalContainerStackChanged.connect(self._updateExtruders)
|
||||||
|
@ -90,17 +90,17 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||||
def addGlobal(self):
|
def addGlobal(self):
|
||||||
return self._add_global
|
return self._add_global
|
||||||
|
|
||||||
useOptionalExtruderChanged = pyqtSignal()
|
addOptionalExtruderChanged = pyqtSignal()
|
||||||
|
|
||||||
def setUseOptionalExtruder(self, use_optional_extruder):
|
def setAddOptionalExtruder(self, add_optional_extruder):
|
||||||
if use_optional_extruder != self._use_optional_extruder:
|
if add_optional_extruder != self._add_optional_extruder:
|
||||||
self._use_optional_extruder = use_optional_extruder
|
self._add_optional_extruder = add_optional_extruder
|
||||||
self.useOptionalExtruderChanged.emit()
|
self.addOptionalExtruderChanged.emit()
|
||||||
self._updateExtruders()
|
self._updateExtruders()
|
||||||
|
|
||||||
@pyqtProperty(bool, fset = setUseOptionalExtruder, notify = useOptionalExtruderChanged)
|
@pyqtProperty(bool, fset = setAddOptionalExtruder, notify = addOptionalExtruderChanged)
|
||||||
def useOptionalExtruder(self):
|
def addOptionalExtruder(self):
|
||||||
return self._use_optional_extruder
|
return self._add_optional_extruder
|
||||||
|
|
||||||
## Set the simpleNames property.
|
## Set the simpleNames property.
|
||||||
def setSimpleNames(self, simple_names):
|
def setSimpleNames(self, simple_names):
|
||||||
|
@ -199,7 +199,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel):
|
||||||
items.sort(key = lambda i: i["index"])
|
items.sort(key = lambda i: i["index"])
|
||||||
# We need optional extruder to be last, so add it after we do sorting.
|
# We need optional extruder to be last, so add it after we do sorting.
|
||||||
# This way we can simply intrepret the -1 of the index as the last item (which it now always is)
|
# This way we can simply intrepret the -1 of the index as the last item (which it now always is)
|
||||||
if self._use_optional_extruder:
|
if self._add_optional_extruder:
|
||||||
item = {
|
item = {
|
||||||
"id": "zomg",
|
"id": "zomg",
|
||||||
"name": "Not overridden",
|
"name": "Not overridden",
|
||||||
|
|
|
@ -20,7 +20,7 @@ SettingItem
|
||||||
model: Cura.ExtrudersModel
|
model: Cura.ExtrudersModel
|
||||||
{
|
{
|
||||||
onModelChanged: control.color = getItem(control.currentIndex).color
|
onModelChanged: control.color = getItem(control.currentIndex).color
|
||||||
useOptionalExtruder: true
|
addOptionalExtruder: true
|
||||||
}
|
}
|
||||||
|
|
||||||
textRole: "name"
|
textRole: "name"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue