mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 15:07:28 -06:00
Peristance of 'Installed' text.
part of CURA-8587
This commit is contained in:
parent
3be6747e5d
commit
a61c3e9eff
3 changed files with 9 additions and 2 deletions
|
@ -291,6 +291,8 @@ class PackageModel(QObject):
|
|||
|
||||
disablePackageTriggered = pyqtSignal(str)
|
||||
|
||||
recentlyInstalledChanged = pyqtSignal(bool)
|
||||
|
||||
# --- enabling ---
|
||||
|
||||
@pyqtProperty(str, notify = stateManageButtonChanged)
|
||||
|
@ -370,6 +372,10 @@ class PackageModel(QObject):
|
|||
self._is_recently_installed = value
|
||||
self.stateManageButtonChanged.emit()
|
||||
|
||||
@pyqtProperty(bool, notify = stateManageButtonChanged)
|
||||
def isRecentlyInstalled(self):
|
||||
return self._is_recently_installed
|
||||
|
||||
@property
|
||||
def can_downgrade(self) -> bool:
|
||||
"""Flag if the installed package can be downgraded to a bundled version"""
|
||||
|
|
|
@ -19,6 +19,7 @@ RowLayout
|
|||
property string confirmedSecondaryText: confirmedMessageText.text
|
||||
property bool busy
|
||||
property bool confirmed
|
||||
property bool confirmedTextChoice: true
|
||||
|
||||
signal clicked(bool primary_action)
|
||||
|
||||
|
@ -228,6 +229,7 @@ RowLayout
|
|||
{
|
||||
target: confirmedMessage
|
||||
visible: true
|
||||
text: manageButton.confirmedTextChoice ? manageButton.confirmedPrimaryText : manageButton.confirmedSecondaryText
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -361,10 +361,9 @@ Rectangle
|
|||
secondaryText: catalog.i18nc("@button", "Uninstall")
|
||||
busySecondaryText: catalog.i18nc("@button", "Uninstalling...")
|
||||
confirmedSecondaryText: catalog.i18nc("@button", "Uninstalled")
|
||||
confirmedTextChoice: packageData.isRecentlyInstalled
|
||||
enabled: !(enableManageButton.busy || updateManageButton.busy)
|
||||
|
||||
onStateChanged: print(packageData.displayName + " " + state) // TODO: Cleanup once you find out why this happens
|
||||
|
||||
onClicked:
|
||||
{
|
||||
if (primary_action)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue