Skip to content
Snippets Groups Projects
Commit ccfa4ed9 authored by Pierre Lamot's avatar Pierre Lamot Committed by Hugo Beauzée-Luyssen
Browse files

qml: use the default loadView implementation in NetworkDisplay

the custom implementation is no longer needed
parent 00d2b8ed
No related branches found
No related tags found
1 merge request!607qml: improve navigation history
Pipeline #138653 passed with stage
in 21 minutes and 6 seconds
......@@ -34,8 +34,6 @@ Widgets.PageLoader {
property var contentModel
property bool isViewMultiView: true
property var tree: undefined
property Component localMenuDelegate
// Settings
......@@ -60,29 +58,10 @@ Widgets.PageLoader {
||
currentItem.isViewMultiView);
if (tree) {
if (view.name === "home")
localMenuDelegate = null;
else
localMenuDelegate = componentBar;
} else {
localMenuDelegate = null;
}
}
// Functions
// PageLoader reimplementation
// FIXME: Maybe this could be done with a 'guard' mechanism on the pageModel.
function loadView() {
if (tree)
stackView.loadView(pageModel, view.name, view.properties);
if (view.name === "browse")
localMenuDelegate = componentBar
else
stackView.loadView(pageModel, "home", view.properties);
stackView.currentItem.Navigation.parentItem = root;
currentItemChanged(stackView.currentItem);
localMenuDelegate = null
}
// Connections
......@@ -91,10 +70,7 @@ Widgets.PageLoader {
target: stackView.currentItem
onBrowse: {
root.tree = tree;
history.push(["mc", "network", "browse", { tree: tree }]);
stackView.currentItem.setCurrentItemFocus(reason);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment