mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 02:29:08 +08:00
Only instantiate setting menus when it's visible
This saves a bit of time on booting and prevents unneeded updates ( because it doesn't matter if a setting changes if no-one is watching!)
This commit is contained in:
parent
dee739db8b
commit
7754b8a447
@ -19,7 +19,6 @@ class BaseMaterialsModel(ListModel):
|
||||
|
||||
def __init__(self, parent = None):
|
||||
super().__init__(parent)
|
||||
|
||||
from cura.CuraApplication import CuraApplication
|
||||
|
||||
self._application = CuraApplication.getInstance()
|
||||
|
@ -14,10 +14,14 @@ Menu
|
||||
|
||||
PrinterMenu { title: catalog.i18nc("@title:menu menubar:settings", "&Printer") }
|
||||
|
||||
onAboutToShow: extruderInstantiator.active = true
|
||||
onAboutToHide: extruderInstantiator.active = false
|
||||
Instantiator
|
||||
{
|
||||
id: extruderInstantiator
|
||||
model: Cura.MachineManager.activeMachine.extruderList
|
||||
|
||||
active: false
|
||||
asynchronous: true
|
||||
Menu
|
||||
{
|
||||
title: modelData.name
|
||||
|
Loading…
x
Reference in New Issue
Block a user