diff --git a/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml b/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml index 84f69d8d4e..73a1b7ec18 100644 --- a/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml +++ b/plugins/Toolbox/resources/qml/dialogs/CompatibilityDialog.qml @@ -20,6 +20,8 @@ UM.Dialog{ maximumHeight: minimumHeight margin: 0 + property string buttonText: subscribedPackagesModel.hasIncompatiblePackages && !subscribedPackagesModel.hasCompatiblePackages ? "Dismiss" : "Next" + Rectangle { id: root @@ -138,7 +140,7 @@ UM.Dialog{ anchors.bottom: parent.bottom anchors.right: parent.right anchors.margins: UM.Theme.getSize("default_margin").height - text: catalog.i18nc("@button", "Next") + text: catalog.i18nc("@button", buttonText) onClicked: accept() leftPadding: UM.Theme.getSize("dialog_primary_button_padding").width rightPadding: UM.Theme.getSize("dialog_primary_button_padding").width diff --git a/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py b/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py index d5c6e38b85..950d6c57c1 100644 --- a/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py +++ b/plugins/Toolbox/src/CloudSync/DiscrepanciesPresenter.py @@ -29,9 +29,12 @@ class DiscrepanciesPresenter(QObject): self._dialog.accepted.connect(lambda: self._onConfirmClicked(model)) def _onConfirmClicked(self, model: SubscribedPackagesModel) -> None: - # For now, all compatible packages presented to the user should be installed. - # Later, we might remove items for which the user unselected the package + # If there are incompatible packages - automatically dismiss them if model.getIncompatiblePackages(): self._package_manager.dismissAllIncompatiblePackages(model.getIncompatiblePackages()) - model.setItems(model.getCompatiblePackages()) - self.packageMutations.emit(model) # #### proveri sho e ova??? + + # For now, all compatible packages presented to the user should be installed. + # Later, we might remove items for which the user unselected the package + if model.getCompatiblePackages(): + model.setItems(model.getCompatiblePackages()) + self.packageMutations.emit(model) # #### proveri sho e ova???