mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Renamed recently_install to better depict the usage
This flag is an indication if the package. was recently un-/installed Contributes to: CURA-8587
This commit is contained in:
parent
fd508342fe
commit
e0ca0d5446
3 changed files with 11 additions and 11 deletions
|
@ -68,7 +68,7 @@ class LocalPackageList(PackageList):
|
|||
self._connectManageButtonSignals(package)
|
||||
package.can_downgrade = self._manager.canDowngrade(package_id)
|
||||
if package_id in self._manager.getPackagesToRemove() or package_id in self._manager.getPackagesToInstall():
|
||||
package.is_recently_installed = True
|
||||
package.installation_status_changed = True
|
||||
return package
|
||||
|
||||
def checkForUpdates(self, packages: List[Dict[str, Any]]):
|
||||
|
|
|
@ -70,7 +70,7 @@ class PackageModel(QObject):
|
|||
self._icon_url = author_data.get("icon_url", "")
|
||||
|
||||
self._is_installing: ManageState = ManageState.HALTED
|
||||
self._is_recently_installed = False
|
||||
self._installation_status_changed = False
|
||||
self._is_recently_updated = False
|
||||
self._is_recently_enabled = False
|
||||
|
||||
|
@ -338,7 +338,7 @@ class PackageModel(QObject):
|
|||
"""The state of the Manage Install package card"""
|
||||
if self._is_installing == ManageState.PROCESSING:
|
||||
return "busy"
|
||||
if self._is_recently_installed:
|
||||
if self._installation_status_changed:
|
||||
return "confirmed"
|
||||
if self._is_installed:
|
||||
if self._is_bundled and not self._can_downgrade:
|
||||
|
@ -358,17 +358,17 @@ class PackageModel(QObject):
|
|||
if value != self._is_installing:
|
||||
self._is_installing = value
|
||||
if value == ManageState.HALTED:
|
||||
self._is_recently_installed = True
|
||||
self._installation_status_changed = True
|
||||
self.stateManageButtonChanged.emit()
|
||||
|
||||
@property
|
||||
def is_recently_installed(self):
|
||||
return self._is_recently_installed
|
||||
def installation_status_changed(self):
|
||||
return self._installation_status_changed
|
||||
|
||||
@is_recently_installed.setter
|
||||
def is_recently_installed(self, value):
|
||||
if value != self._is_recently_installed:
|
||||
self._is_recently_installed = value
|
||||
@installation_status_changed.setter
|
||||
def installation_status_changed(self, value):
|
||||
if value != self._installation_status_changed:
|
||||
self._installation_status_changed = value
|
||||
self.stateManageButtonChanged.emit()
|
||||
|
||||
@pyqtProperty(bool, notify = stateManageButtonChanged)
|
||||
|
|
|
@ -124,7 +124,7 @@ class RemotePackageList(PackageList):
|
|||
package = PackageModel(package_data, parent = self)
|
||||
self._connectManageButtonSignals(package)
|
||||
if package_id in self._manager.getPackagesToRemove() or package_id in self._manager.getPackagesToInstall():
|
||||
package.is_recently_installed = True
|
||||
package.installation_status_changed = True
|
||||
self.appendItem({"package": package}) # Add it to this list model.
|
||||
except RuntimeError:
|
||||
# Setting the ownership of this object to not qml can still result in a RuntimeError. Which can occur when quickly toggling
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue