mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Only show changelog if we have a global container stack
If we have no global stack we can assume this is a "first run" situation. Contributes to CURA-2519
This commit is contained in:
parent
2b117c0450
commit
cd2cbcbd66
1 changed files with 7 additions and 2 deletions
|
@ -33,7 +33,6 @@ class ChangeLog(Extension, QObject,):
|
|||
Application.getInstance().engineCreatedSignal.connect(self._onEngineCreated)
|
||||
Preferences.getInstance().addPreference("general/latest_version_changelog_shown", "2.0.0") #First version of CURA with uranium
|
||||
self.addMenuItem(catalog.i18nc("@item:inmenu", "Show Changelog"), self.showChangelog)
|
||||
#self.showChangelog()
|
||||
|
||||
def getChangeLogs(self):
|
||||
if not self._change_logs:
|
||||
|
@ -87,6 +86,13 @@ class ChangeLog(Extension, QObject,):
|
|||
else:
|
||||
latest_version_shown = Version(Preferences.getInstance().getValue("general/latest_version_changelog_shown"))
|
||||
|
||||
Preferences.getInstance().setValue("general/latest_version_changelog_shown", Application.getInstance().getVersion())
|
||||
|
||||
# Do not show the changelog when there is no global container stack
|
||||
# This implies we are running Cura for the first time.
|
||||
if not Application.getInstance().getGlobalContainerStack():
|
||||
return
|
||||
|
||||
if self._version > latest_version_shown:
|
||||
self.showChangelog()
|
||||
|
||||
|
@ -95,7 +101,6 @@ class ChangeLog(Extension, QObject,):
|
|||
self.createChangelogWindow()
|
||||
|
||||
self._changelog_window.show()
|
||||
Preferences.getInstance().setValue("general/latest_version_changelog_shown", Application.getInstance().getVersion())
|
||||
|
||||
def hideChangelog(self):
|
||||
if self._changelog_window:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue