mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-22 04:29:01 +08:00
Apply suggestions from code review
Co-authored-by: Casper Lamboo <c.lamboo@ultimaker.com>
This commit is contained in:
parent
b132b5c08c
commit
142f1823b3
@ -46,7 +46,7 @@ class ActiveIntentQualitiesModel(ListModel):
|
||||
def _updateDelayed(self):
|
||||
self._update_timer.start()
|
||||
|
||||
def _onChanged(self, container):
|
||||
def _onChanged(self, container: ContainerStack) -> None:
|
||||
if container.getMetaDataEntry("type") == "intent":
|
||||
self._updateDelayed()
|
||||
|
||||
|
@ -25,7 +25,7 @@ class IntentSelectionModel(ListModel):
|
||||
DescriptionRole = Qt.ItemDataRole.UserRole + 4
|
||||
IconRole = Qt.ItemDataRole.UserRole + 5
|
||||
|
||||
def __init__(self, parent=None):
|
||||
def __init__(self, parent=QAbstractListModel) -> None:
|
||||
super().__init__(parent)
|
||||
|
||||
self.addRoleName(self.NameRole, "name")
|
||||
|
Loading…
x
Reference in New Issue
Block a user