mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Refactor properties that start with 'get' to avoid confusion between slots & properties
Case in point: LayerViewProxy.getLayerViewType was decorated as a property but was used/intended as a slot.
This commit is contained in:
parent
bb030c724b
commit
9229027001
8 changed files with 18 additions and 18 deletions
|
@ -20,7 +20,7 @@ class LayerViewProxy(QObject):
|
|||
preferencesChanged = pyqtSignal()
|
||||
|
||||
@pyqtProperty(bool, notify = activityChanged)
|
||||
def getLayerActivity(self):
|
||||
def layerActivity(self):
|
||||
active_view = self._controller.getActiveView()
|
||||
if type(active_view) == LayerView.LayerView.LayerView:
|
||||
return active_view.getActivity()
|
||||
|
@ -79,7 +79,7 @@ class LayerViewProxy(QObject):
|
|||
if type(active_view) == LayerView.LayerView.LayerView:
|
||||
active_view.setLayerViewType(layer_view_type)
|
||||
|
||||
@pyqtProperty(bool)
|
||||
@pyqtSlot(result = int)
|
||||
def getLayerViewType(self):
|
||||
active_view = self._controller.getActiveView()
|
||||
if type(active_view) == LayerView.LayerView.LayerView:
|
||||
|
@ -124,7 +124,7 @@ class LayerViewProxy(QObject):
|
|||
active_view.setShowInfill(show)
|
||||
|
||||
@pyqtProperty(int, notify = globalStackChanged)
|
||||
def getExtruderCount(self):
|
||||
def extruderCount(self):
|
||||
active_view = self._controller.getActiveView()
|
||||
if type(active_view) == LayerView.LayerView.LayerView:
|
||||
return active_view.getExtruderCount()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue