mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Solved (with an ugly fix) that after loading some projects, 'Slicing...' appears without doing anything. CURA-1263
This commit is contained in:
parent
a6194aa2cf
commit
a9a9390aa6
5 changed files with 13 additions and 1 deletions
|
@ -32,6 +32,7 @@ class SettingInheritanceManager(QObject):
|
|||
def getChildrenKeysWithOverride(self, key):
|
||||
definitions = self._global_container_stack.getBottom().findDefinitions(key=key)
|
||||
if not definitions:
|
||||
Logger.log("w", "Could not find definition for key [%s]", key)
|
||||
return []
|
||||
result = []
|
||||
for key in definitions[0].getAllKeys():
|
||||
|
@ -51,6 +52,7 @@ class SettingInheritanceManager(QObject):
|
|||
|
||||
definitions = self._global_container_stack.getBottom().findDefinitions(key=key)
|
||||
if not definitions:
|
||||
Logger.log("w", "Could not find definition for key [%s] (2)", key)
|
||||
return []
|
||||
result = []
|
||||
for key in definitions[0].getAllKeys():
|
||||
|
|
|
@ -144,6 +144,11 @@ class WorkspaceDialog(QObject):
|
|||
if key in self._result:
|
||||
self._result[key] = strategy
|
||||
|
||||
## Close the backend: otherwise one could end up with "Slicing..."
|
||||
@pyqtSlot()
|
||||
def closeBackend(self):
|
||||
Application.getInstance().getBackend().close()
|
||||
|
||||
def setMaterialConflict(self, material_conflict):
|
||||
self._has_material_conflict = material_conflict
|
||||
self.materialConflictChanged.emit()
|
||||
|
|
|
@ -305,7 +305,7 @@ UM.Dialog
|
|||
{
|
||||
id: ok_button
|
||||
text: catalog.i18nc("@action:button","OK");
|
||||
onClicked: { manager.onOkButtonClicked() }
|
||||
onClicked: { manager.closeBackend(); manager.onOkButtonClicked() }
|
||||
enabled: true
|
||||
},
|
||||
Button
|
||||
|
|
|
@ -149,6 +149,7 @@ class CuraEngineBackend(Backend):
|
|||
|
||||
## Perform a slice of the scene.
|
||||
def slice(self):
|
||||
Logger.log("d", "Starting slice job...")
|
||||
self._slice_start_time = time()
|
||||
if not self._enabled or not self._global_container_stack: # We shouldn't be slicing.
|
||||
# try again in a short time
|
||||
|
|
|
@ -230,6 +230,10 @@ Item {
|
|||
}
|
||||
|
||||
// Setting does have a limit_to_extruder property, so use that one instead.
|
||||
if (definition.key === undefined) {
|
||||
// Observed when loading workspace, probably when SettingItems are removed.
|
||||
return false;
|
||||
}
|
||||
return Cura.SettingInheritanceManager.getOverridesForExtruder(definition.key, globalPropertyProvider.properties.limit_to_extruder).indexOf(definition.key) >= 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue