From 9e16f30612eb73393d7fde121037b1546c98c22b Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Sun, 6 Sep 2020 21:02:15 -0400 Subject: [PATCH] Fixed major issues - Files were not showing at startup - Toggling details wasn't working - Toggling showcase didn't reset the view properly --- explorer/src/ExplorerWindow.ec | 30 +++++++++++++++++------------- libede/src/FileSystemBox.ec | 5 +++++ 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/explorer/src/ExplorerWindow.ec b/explorer/src/ExplorerWindow.ec index d22c0d2..eb690c3 100644 --- a/explorer/src/ExplorerWindow.ec +++ b/explorer/src/ExplorerWindow.ec @@ -532,7 +532,7 @@ class ExplorerWindow : Window ToggleIconToolButton viewDetails { toolBar, this, icon = viewDetails, toolTip = "Toggle Listing Details"; bool NotifyClicked(Button button, int x, int y, Modifiers mods) { - view.details = true; + view.details = button.checked; view.treeBranches = false; view.Refresh(); view.Activate(); @@ -1207,24 +1207,27 @@ class ExplorerWindow : Window void UpdateHistoryItem(FileSystemBoxSelection selection) { - HistoryItem item = history[historyIndex]; - - if(!item.holdRecordingSelection) + if(history.count > historyIndex) // TODO: Review why this would happen... { - if(selection.node || (selection.nodes && selection.nodes.count)) + HistoryItem item = history[historyIndex]; + + if(!item.holdRecordingSelection) { - item.selection.Free(); - if(selection.nodes.count) + if(selection.node || (selection.nodes && selection.nodes.count)) { - for(node : selection.nodes) - item.selection.Add(CopyString(node.path)); + item.selection.Free(); + if(selection.nodes.count) + { + for(node : selection.nodes) + item.selection.Add(CopyString(node.path)); + } + else if(selection.node) + item.selection.Add(CopyString(selection.node.path)); } - else if(selection.node) - item.selection.Add(CopyString(selection.node.path)); } + else + item.holdRecordingSelection = false; } - else - item.holdRecordingSelection = false; } void SearchStart() @@ -1387,6 +1390,7 @@ class ExplorerWindow : Window //userMode = true; addressBar.path = view.path; ReadyTree(); + view.Refresh(); return true; } diff --git a/libede/src/FileSystemBox.ec b/libede/src/FileSystemBox.ec index 36edd05..8842cf1 100644 --- a/libede/src/FileSystemBox.ec +++ b/libede/src/FileSystemBox.ec @@ -281,6 +281,11 @@ public: split.leftPane = value ? list : null; split.visible = value; show.visible = value; + if(!value) + { + list.parent = this; + list.anchor = Anchor { left = 0, top = 0, right = 0, bottom = 0 }; + } } get { return bits.preview; } }; -- 1.8.3.1