enhancement

This commit is contained in:
xfarrow 2023-08-07 16:07:07 +02:00
parent 0ba5721315
commit 37a1f7248a
1 changed files with 5 additions and 6 deletions

View File

@ -14,6 +14,7 @@ import code.Constants;
import code.Constants.GuifyColors; import code.Constants.GuifyColors;
import code.TreeNode; import code.TreeNode;
import code.Helper; import code.Helper;
import code.IDirectoryNodeButton;
import code.JDirectoryNodeButton; import code.JDirectoryNodeButton;
import code.WrapLayout; import code.WrapLayout;
import controllers.DesktopController; import controllers.DesktopController;
@ -1155,13 +1156,11 @@ public class Desktop extends JFrame implements IDesktopFrame {
} }
private void unselectAllNodes() { private void unselectAllNodes() {
controller.clearSelectedNodes(); for (IDirectoryNodeButton directoryNode : controller
// TODO: gotta enhance this for .getSelectedNodes()) {
for (Component component : desktopPanel.getComponents()) { ((JDirectoryNodeButton)directoryNode).setBackground(new Color(255, 255, 255));
if (component instanceof JDirectoryNodeButton) {
component.setBackground(new Color(255, 255, 255));
}
} }
controller.clearSelectedNodes();
updateToolBarItems(); updateToolBarItems();
} }