Revert "Add a few process events to setActiveMachine to make it react more smooth"

This reverts commit 27701f7653. After discussion with Nallath we've decided that it wasn't that noticeable and could temporarily display wrong names in the interface. We've decided to undo it for now.

Contributes to issue CURA-6932.
This commit is contained in:
Ghostkeeper 2019-10-28 16:04:43 +01:00
parent 4cc8bf5946
commit 95350cda51
No known key found for this signature in database
GPG key ID: 59A4C0959592C05C

View file

@ -291,8 +291,7 @@ class MachineManager(QObject):
@pyqtSlot(str)
def setActiveMachine(self, stack_id: str) -> None:
self.blurSettings.emit() # Ensure no-one has focus.
self._application.processEvents()
container_registry = CuraContainerRegistry.getInstance()
containers = container_registry.findContainerStacks(id = stack_id)
if not containers:
@ -302,11 +301,9 @@ class MachineManager(QObject):
# Make sure that the default machine actions for this machine have been added
self._application.getMachineActionManager().addDefaultMachineActions(global_stack)
self._application.processEvents()
extruder_manager = ExtruderManager.getInstance()
extruder_manager.fixSingleExtrusionMachineExtruderDefinition(global_stack)
self._application.processEvents()
if not global_stack.isValid():
# Mark global stack as invalid
ConfigurationErrorMessage.getInstance().addFaultyContainers(global_stack.getId())
@ -316,12 +313,8 @@ class MachineManager(QObject):
extruder_manager.addMachineExtruders(global_stack)
self._application.setGlobalContainerStack(global_stack)
self._application.processEvents()
# Switch to the first enabled extruder
self.updateDefaultExtruder()
self._application.processEvents()
default_extruder_position = int(self.defaultExtruderPosition)
old_active_extruder_index = extruder_manager.activeExtruderIndex
extruder_manager.setActiveExtruderIndex(default_extruder_position)