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