From 096b2e876f5a126107331916fbad0c0623fb6c28 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Mon, 23 Jan 2017 19:35:33 +0000 Subject: [PATCH 1/5] removing qml null print error --- interface/resources/qml/hifi/tablet/Tablet.qml | 2 -- 1 file changed, 2 deletions(-) diff --git a/interface/resources/qml/hifi/tablet/Tablet.qml b/interface/resources/qml/hifi/tablet/Tablet.qml index 08e0599a50..128b3a1fd6 100644 --- a/interface/resources/qml/hifi/tablet/Tablet.qml +++ b/interface/resources/qml/hifi/tablet/Tablet.qml @@ -9,8 +9,6 @@ Item { property int rowIndex: 0 property int columnIndex: 0 property int count: (flowMain.children.length - 1) - width: parent.width - height: parent.height // called by C++ code to keep audio bar updated function setMicLevel(newMicLevel) { From a147ce3f5f8ba12d1a3d29fa56c4428f8bd80299 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 25 Jan 2017 15:59:08 +0000 Subject: [PATCH 2/5] fixed load script issue --- libraries/script-engine/src/TabletScriptingInterface.cpp | 4 ++-- scripts/system/edit.js | 1 + scripts/system/tablet-ui/tabletUI.js | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/libraries/script-engine/src/TabletScriptingInterface.cpp b/libraries/script-engine/src/TabletScriptingInterface.cpp index 944da0aa8d..1a028dd0a0 100644 --- a/libraries/script-engine/src/TabletScriptingInterface.cpp +++ b/libraries/script-engine/src/TabletScriptingInterface.cpp @@ -204,7 +204,7 @@ void TabletProxy::gotoMenuScreen() { if (_qmlTabletRoot) { if (_state != State::Menu) { auto loader = _qmlTabletRoot->findChild("loader"); - QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToMenuScreen())); + QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToMenuScreen()), Qt::DirectConnection); QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(VRMENU_SOURCE_URL))); _state = State::Menu; } @@ -215,7 +215,7 @@ void TabletProxy::gotoHomeScreen() { if (_qmlTabletRoot) { if (_state != State::Home) { auto loader = _qmlTabletRoot->findChild("loader"); - QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen())); + QObject::connect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen()), Qt::DirectConnection); QMetaObject::invokeMethod(_qmlTabletRoot, "loadSource", Q_ARG(const QVariant&, QVariant(TABLET_SOURCE_URL))); QMetaObject::invokeMethod(_qmlTabletRoot, "playButtonClickSound"); _state = State::Home; diff --git a/scripts/system/edit.js b/scripts/system/edit.js index 4c542e9867..becf2d54dd 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -196,6 +196,7 @@ var toolBar = (function () { function cleanup() { that.setActive(false); + tablet.removeButton(activeButton); } function addButton(name, image, handler) { diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index 7011aa4cab..003cdc31e0 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -104,4 +104,10 @@ } return micLevel; } + + Script.scriptEnding.connect(function () { + Entities.deleteEntity(HMD.tabletID); + HMD.tabletID = null; + HDM.homeButtonID = null; + }); }()); // END LOCAL_SCOPE From bda8b65e79098406e01c915a7da3b9dd13599d6e Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 25 Jan 2017 16:06:40 +0000 Subject: [PATCH 3/5] fixing spaceing --- scripts/system/tablet-ui/tabletUI.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index 003cdc31e0..3cbda5d4fc 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -109,5 +109,5 @@ Entities.deleteEntity(HMD.tabletID); HMD.tabletID = null; HDM.homeButtonID = null; - }); + }) }()); // END LOCAL_SCOPE From bc75cf5bed1ef49795b26cf4b6db513a8ce29b9a Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 25 Jan 2017 16:11:37 +0000 Subject: [PATCH 4/5] removed tabs --- scripts/system/edit.js | 2 +- scripts/system/tablet-ui/tabletUI.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index becf2d54dd..fdd20f8796 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -196,7 +196,7 @@ var toolBar = (function () { function cleanup() { that.setActive(false); - tablet.removeButton(activeButton); + tablet.removeButton(activeButton); } function addButton(name, image, handler) { diff --git a/scripts/system/tablet-ui/tabletUI.js b/scripts/system/tablet-ui/tabletUI.js index 3cbda5d4fc..017f9c0958 100644 --- a/scripts/system/tablet-ui/tabletUI.js +++ b/scripts/system/tablet-ui/tabletUI.js @@ -106,8 +106,8 @@ } Script.scriptEnding.connect(function () { - Entities.deleteEntity(HMD.tabletID); - HMD.tabletID = null; - HDM.homeButtonID = null; - }) + Entities.deleteEntity(HMD.tabletID); + HMD.tabletID = null; + HDM.homeButtonID = null; + }); }()); // END LOCAL_SCOPE From c8118391639f3b8893b56dcd9ddd5c2b0aef43d0 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Wed, 25 Jan 2017 16:46:17 +0000 Subject: [PATCH 5/5] tablet is not selectable in edit mode --- scripts/system/edit.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/system/edit.js b/scripts/system/edit.js index fdd20f8796..ee16b683b3 100644 --- a/scripts/system/edit.js +++ b/scripts/system/edit.js @@ -697,7 +697,9 @@ function mouseClickEvent(event) { toolBar.setActive(true); var pickRay = result.pickRay; var foundEntity = result.entityID; - + if (foundEntity === HMD.tabletID) { + return; + } properties = Entities.getEntityProperties(foundEntity); if (isLocked(properties)) { if (wantDebug) {