Merge pull request #9534 from druiz17/tabletBug

Fixed tablet from crashing when clicking on items in the menu
This commit is contained in:
Seth Alves 2017-01-27 11:09:50 -08:00 committed by GitHub
commit b9087f4b04

View file

@ -203,6 +203,7 @@ void TabletProxy::setQmlTabletRoot(QQuickItem* qmlTabletRoot, QObject* qmlOffscr
void TabletProxy::gotoMenuScreen() {
if (_qmlTabletRoot) {
if (_state != State::Menu) {
removeButtonsFromHomeScreen();
auto loader = _qmlTabletRoot->findChild<QQuickItem*>("loader");
QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToMenuScreen()), Qt::DirectConnection);
QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(VRMENU_SOURCE_URL)));