From 971a9d10d2147c88fc5e403cda51539e4762cdc3 Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 19 Oct 2022 01:18:25 +0200 Subject: [PATCH] Reverting not swapping the sidebar at load. As the bug is *still* very much present. Notably when you load a graph from command line arguments. --- .../ad5001/LogarithmPlotter/LogarithmPlotter.qml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml index 4d7039a..445c03c 100644 --- a/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml +++ b/LogarithmPlotter/qml/eu/ad5001/LogarithmPlotter/LogarithmPlotter.qml @@ -276,15 +276,15 @@ ApplicationWindow { history.unserialize(...data["history"]) // Refreshing sidebar - //if(sidebarSelector.currentIndex == 0) { - // // For some reason, if we load a file while the tab is on object, - // // we get stuck in a Qt-side loop? Qt bug or side-effect here, I don't know. - // sidebarSelector.currentIndex = 1 - // objectLists.update() - // delayRefreshTimer.start() - //} else { + if(sidebarSelector.currentIndex == 0) { + // For some reason, if we load a file while the tab is on object, + // we get stuck in a Qt-side loop? Qt bug or side-effect here, I don't know. + sidebarSelector.currentIndex = 1 + objectLists.update() + delayRefreshTimer.start() + } else { objectLists.update() - //} + } } else { error = qsTr("Invalid file provided.") }