diff options
author | Egor Nemtsev <enemtsev@luxoft.com> | 2020-01-31 14:38:25 +0300 |
---|---|---|
committer | Egor Nemtsev <enemtsev@luxoft.com> | 2020-01-31 13:48:41 +0000 |
commit | 74221eb83c18983c47a44a51b29a181589f4c2a9 (patch) | |
tree | caf1c6469ca8fdd5752893ca03328a040aa08d23 | |
parent | a3f5ae361051d5d483df062fadb74804e0db13cf (diff) |
[sysui] delay model populating
-- whole this "model.populating" process needs to be reworked,
because there is no any control for model filing (model is filled
by appmnan itself) and than we try to launch some apps in proper
windows. This change is hotfix, its aim is to be sure that
when we want to launch some app that app is ready to be launched
Task-number: AUTOSUITE-1439
Change-Id: I97065226250071f2d78c26e97bc13486f7208937
Reviewed-by: Nikolay Zamotaev <nzamotaev@luxoft.com>
-rw-r--r-- | sysui/centerconsole/CenterConsoleWindow.qml | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/sysui/centerconsole/CenterConsoleWindow.qml b/sysui/centerconsole/CenterConsoleWindow.qml index 6832a471..df0bef50 100644 --- a/sysui/centerconsole/CenterConsoleWindow.qml +++ b/sysui/centerconsole/CenterConsoleWindow.qml @@ -73,24 +73,31 @@ Window { Connections { id: windowConns target: root + readonly property string widgetStates: root.store.settingsStore.value("widgetStates" + , root.store.settingsStore.defaultWidgetStates) + readonly property string autostartApps: root.store.settingsStore.value("autostartApps" + , root.store.settingsStore.defaultAutostartApps) + readonly property string autorecoverApps: root.store.settingsStore.value("autorecoverApps" + , root.store.settingsStore.defaultAutorecoverApps) onFrameSwapped: { /* - The UI is loaded in two steps - This is done in order to ensure that something is rendered on the screen as - soon as possible during start up. - - Only the lightest elements are present upon creation of this component. - They are the ones that will be present on the very first rendered frame. - - Others, which are more complex and thus take more time to load, will be - loaded afterwards, once this function is called. - */ - root.store.applicationModel.populate(root.store.settingsStore.value("widgetStates", root.store.settingsStore.defaultWidgetStates), - root.store.settingsStore.value("autostartApps", root.store.settingsStore.defaultAutostartApps), - root.store.settingsStore.value("autorecoverApps", root.store.settingsStore.defaultAutorecoverApps)); - centerConsole.mainContentArea.active = true; - notificationLoader.active = true; - windowConns.enabled = false; + The UI is loaded in two steps + This is done in order to ensure that something is rendered on the screen as + soon as possible during start up. + + Only the lightest elements are present upon creation of this component. + They are the ones that will be present on the very first rendered frame. + + Others, which are more complex and thus take more time to load, will be + loaded afterwards, once this function is called. + */ + if (root.store.applicationModel.count > 0) { + root.store.applicationModel.populate( + widgetStates, autostartApps, autorecoverApps); + centerConsole.mainContentArea.active = true; + notificationLoader.active = true; + windowConns.enabled = false; + } } } |