Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 2 files). Show all
Unified · Split
| @@ -275,7 +275,8 @@ void TabletProxy::setQmlTabletRoot(QQuickItem* qmlTabletRoot, QObject* qmlOffscr · 274 unmodified lines | ||
| 275 | 275 | QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(TABLET_SOURCE_URL))); |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | − gotoHomeScreen(); | |
| 278 | + // force to the tablet to go to the homescreen | |
| 279 | + gotoHomeScreen(true); | |
| 279 | 280 | |
| 280 | 281 | QMetaObject::invokeMethod(_qmlTabletRoot, "setUsername", Q_ARG(const QVariant&, QVariant(getUsername()))); |
| 281 | 282 | |
| @@ -293,6 +294,9 @@ void TabletProxy::setQmlTabletRoot(QQuickItem* qmlTabletRoot, QObject* qmlOffscr · 11 unmodified lines | ||
| 293 | 294 | } |
| 294 | 295 | } |
| 295 | 296 | |
| 297 | +void TabletProxy::gotoHomeScreen() { | |
| 298 | + gotoHomeScreen(false); | |
| 299 | +} | |
| 296 | 300 | void TabletProxy::gotoMenuScreen(const QString& submenu) { |
| 297 | 301 | |
| 298 | 302 | QObject* root = nullptr; |
| @@ -334,8 +338,8 @@ void TabletProxy::loadQMLSource(const QVariant& path) { · 35 unmodified lines | ||
| 334 | 338 | } |
| 335 | 339 | } |
| 336 | 340 | |
| 337 | −void TabletProxy::gotoHomeScreen() { | |
| 338 | − if (_state != State::Home || _state != State::Uninitialized) { | |
| 341 | +void TabletProxy::gotoHomeScreen(bool forceOntoHomeScreen) { | |
| 342 | + if (_state != State::Home && ( _state != State::Uninitialized || forceOntoHomeScreen)) { | |
| 339 | 343 | if (!_toolbarMode && _qmlTabletRoot) { |
| 340 | 344 | auto loader = _qmlTabletRoot->findChild<QQuickItem*>("loader"); |
| 341 | 345 | QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen()), Qt::DirectConnection); |