Fixed major issues master
authorJerome St-Louis <jerome@ecere.com>
Mon, 7 Sep 2020 01:02:15 +0000 (21:02 -0400)
committerJerome St-Louis <jerome@ecere.com>
Mon, 7 Sep 2020 01:02:15 +0000 (21:02 -0400)
- Files were not showing at startup
- Toggling details wasn't working
- Toggling showcase didn't reset the view properly

explorer/src/ExplorerWindow.ec
libede/src/FileSystemBox.ec

index d22c0d2..eb690c3 100644 (file)
@@ -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;
    }
 
index 36edd05..8842cf1 100644 (file)
@@ -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; }
    };