mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Toolbar mode: 1. Fixed switching between different apps. 2. Fixed switching from Create
This commit is contained in:
parent
5bdaa4daa1
commit
4330e31212
3 changed files with 8 additions and 9 deletions
|
@ -33,7 +33,7 @@ Rectangle {
|
|||
|
||||
// only show the title if loaded through a "loader"
|
||||
function showTitle() {
|
||||
return root.parent.objectName == "loader";
|
||||
return (root.parent !== null) && root.parent.objectName == "loader";
|
||||
}
|
||||
|
||||
Column {
|
||||
|
|
|
@ -237,7 +237,6 @@ void TabletProxy::setToolbarMode(bool toolbarMode) {
|
|||
}
|
||||
}
|
||||
loadHomeScreen(true);
|
||||
emit screenChanged(QVariant("Home"), QVariant(TABLET_SOURCE_URL));
|
||||
}
|
||||
|
||||
static void addButtonProxyToQmlTablet(QQuickItem* qmlTablet, TabletButtonProxy* buttonProxy) {
|
||||
|
@ -463,14 +462,14 @@ void TabletProxy::loadQMLSource(const QVariant& path) {
|
|||
}
|
||||
|
||||
if (root) {
|
||||
if (_state != State::QML) {
|
||||
removeButtonsFromHomeScreen();
|
||||
QMetaObject::invokeMethod(root, "loadSource", Q_ARG(const QVariant&, path));
|
||||
_state = State::QML;
|
||||
removeButtonsFromHomeScreen(); //works only in Tablet
|
||||
QMetaObject::invokeMethod(root, "loadSource", Q_ARG(const QVariant&, path));
|
||||
_state = State::QML;
|
||||
if (path != _currentPathLoaded) {
|
||||
emit screenChanged(QVariant("QML"), path);
|
||||
_currentPathLoaded = path;
|
||||
QMetaObject::invokeMethod(root, "setShown", Q_ARG(const QVariant&, QVariant(true)));
|
||||
}
|
||||
_currentPathLoaded = path;
|
||||
QMetaObject::invokeMethod(root, "setShown", Q_ARG(const QVariant&, QVariant(true)));
|
||||
} else {
|
||||
qCDebug(uiLogging) << "tablet cannot load QML because _qmlTabletRoot is null";
|
||||
}
|
||||
|
|
|
@ -419,7 +419,7 @@ var toolBar = (function () {
|
|||
createButton = activeButton;
|
||||
tablet.screenChanged.connect(function (type, url) {
|
||||
if (isActive && (type !== "QML" || url !== "Edit.qml")) {
|
||||
that.toggle();
|
||||
that.setActive(false)
|
||||
}
|
||||
});
|
||||
tablet.fromQml.connect(fromQml);
|
||||
|
|
Loading…
Reference in a new issue