diff --git a/cura/MachineAction.py b/cura/MachineAction.py index 94b096f9c1..773a1cad1a 100644 --- a/cura/MachineAction.py +++ b/cura/MachineAction.py @@ -33,6 +33,12 @@ class MachineAction(QObject, PluginObject): def getKey(self) -> str: return self._key + ## Whether this action needs to ask the user anything. + # If not, we shouldn't present the user with certain screens which otherwise show up. + # Defaults to true to be in line with the old behaviour. + def needsUserInteraction(self) -> bool: + return True + @pyqtProperty(str, notify = labelChanged) def label(self) -> str: return self._label diff --git a/cura/UI/WelcomePagesModel.py b/cura/UI/WelcomePagesModel.py index cb47b37bfc..1dc87de50b 100644 --- a/cura/UI/WelcomePagesModel.py +++ b/cura/UI/WelcomePagesModel.py @@ -221,7 +221,7 @@ class WelcomePagesModel(ListModel): definition_id = global_stack.definition.getId() first_start_actions = self._application.getMachineActionManager().getFirstStartActions(definition_id) - return len(first_start_actions) > 0 + return len([action for action in first_start_actions if action.needsUserInteraction()]) > 0 def addPage(self) -> None: pass diff --git a/plugins/UM3NetworkPrinting/src/DiscoverUM3Action.py b/plugins/UM3NetworkPrinting/src/DiscoverUM3Action.py index e1e6121244..a2a319b46a 100644 --- a/plugins/UM3NetworkPrinting/src/DiscoverUM3Action.py +++ b/plugins/UM3NetworkPrinting/src/DiscoverUM3Action.py @@ -41,6 +41,11 @@ class DiscoverUM3Action(MachineAction): # Time to wait after a zero-conf service change before allowing a zeroconf reset self._zero_conf_change_grace_period = 0.25 #type: float + # Overrides the one in MachineAction. + # This requires not attention from the user (any more), so we don't need to show any 'upgrade screens'. + def needsUserInteraction(self) -> bool: + return False + @pyqtSlot() def startDiscovery(self): if not self._network_plugin: