mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 11:03:13 +08:00
Fix update should show logic
CURA-6447
This commit is contained in:
parent
0665076018
commit
01c0fe1ffb
@ -202,13 +202,15 @@ class WelcomePagesModel(ListModel):
|
|||||||
# FIXME: HACKs for optimization that we don't update the model every time the active machine gets changed.
|
# FIXME: HACKs for optimization that we don't update the model every time the active machine gets changed.
|
||||||
def _onActiveMachineChanged(self) -> None:
|
def _onActiveMachineChanged(self) -> None:
|
||||||
self._application.getMachineManager().globalContainerChanged.disconnect(self._onActiveMachineChanged)
|
self._application.getMachineManager().globalContainerChanged.disconnect(self._onActiveMachineChanged)
|
||||||
self.initialize()
|
self._initialize(update_should_show_flag = False)
|
||||||
|
|
||||||
def initialize(self) -> None:
|
def initialize(self) -> None:
|
||||||
self._application.getMachineManager().globalContainerChanged.connect(self._onActiveMachineChanged)
|
self._application.getMachineManager().globalContainerChanged.connect(self._onActiveMachineChanged)
|
||||||
self._initialize()
|
self._initialize()
|
||||||
|
|
||||||
def _initialize(self) -> None:
|
def _initialize(self, update_should_show_flag: bool = True) -> None:
|
||||||
|
show_whatsnew_only = False
|
||||||
|
if update_should_show_flag:
|
||||||
has_active_machine = self._application.getMachineManager().activeMachine is not None
|
has_active_machine = self._application.getMachineManager().activeMachine is not None
|
||||||
has_app_just_upgraded = self._application.hasJustUpgradedToNewVersion()
|
has_app_just_upgraded = self._application.hasJustUpgradedToNewVersion()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user