Fix empty quality slider on start.

It seemed that:
- MachineManager was not connected to all the correct signals
- After connecting to the correct signal, ProfilesModel was not yet updated when looping over it in SidebarSimple

Because ProfilesModel's constructor already requests the MachineManager, we cannot do connect itemsChanged the way around as well.

CURA-4707
This commit is contained in:
Jack Ha 2017-12-13 13:33:05 +01:00
parent e10ba065ca
commit 19b56404c6
2 changed files with 20 additions and 4 deletions

View file

@ -49,6 +49,10 @@ class ProfilesModel(InstanceContainersModel):
ProfilesModel.__instance = cls()
return ProfilesModel.__instance
@classmethod
def hasInstance(cls) -> bool:
return ProfilesModel.__instance is not None
__instance = None # type: "ProfilesModel"
## Fetch the list of containers to display.
@ -91,7 +95,6 @@ class ProfilesModel(InstanceContainersModel):
## Re-computes the items in this model, and adds the layer height role.
def _recomputeItems(self):
# Some globals that we can re-use.
global_container_stack = Application.getInstance().getGlobalContainerStack()
if global_container_stack is None: