mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Set properties immediately upon constructing
Instead of afterwards. A bit more efficient. Contributes to issue CURA-8609.
This commit is contained in:
parent
fb7e67b8ad
commit
9729f4f3d2
1 changed files with 4 additions and 3 deletions
|
|
@ -330,11 +330,12 @@ class MaterialManagementModel(QObject):
|
||||||
"""
|
"""
|
||||||
if self._sync_all_dialog is None:
|
if self._sync_all_dialog is None:
|
||||||
qml_path = Resources.getPath(cura.CuraApplication.CuraApplication.ResourceTypes.QmlFiles, "Preferences", "Materials", "MaterialsSyncDialog.qml")
|
qml_path = Resources.getPath(cura.CuraApplication.CuraApplication.ResourceTypes.QmlFiles, "Preferences", "Materials", "MaterialsSyncDialog.qml")
|
||||||
self._sync_all_dialog = cura.CuraApplication.CuraApplication.getInstance().createQmlComponent(qml_path, {})
|
self._sync_all_dialog = cura.CuraApplication.CuraApplication.getInstance().createQmlComponent(qml_path, {
|
||||||
|
"materialManagementModel": self,
|
||||||
|
"pageIndex": 0
|
||||||
|
})
|
||||||
if self._sync_all_dialog is None: # Failed to load QML file.
|
if self._sync_all_dialog is None: # Failed to load QML file.
|
||||||
return
|
return
|
||||||
self._sync_all_dialog.setProperty("materialManagementModel", self)
|
|
||||||
self._sync_all_dialog.setProperty("pageIndex", 0)
|
|
||||||
self._sync_all_dialog.show()
|
self._sync_all_dialog.show()
|
||||||
|
|
||||||
@pyqtSlot(result = QUrl)
|
@pyqtSlot(result = QUrl)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue