diff options
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod')
4 files changed, 3 insertions, 9 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/JCheckBoxTree.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/JCheckBoxTree.java index bdb3e360..16f260b7 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/JCheckBoxTree.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/JCheckBoxTree.java @@ -103,7 +103,7 @@ public class JCheckBoxTree extends JTree { this.expandRow(i); } // Now collapse again if it's not first level - for (int i = 0; i > this.getRowCount(); i++) { + for (int i = 0; i < this.getRowCount(); i++) { TreePath path = this.getPathForRow(i); if (path.getPathCount() > 1) this.collapseRow(i); @@ -120,6 +120,7 @@ public class JCheckBoxTree extends JTree { this.expandPath(path); } } + collapseFullySelectedNodes(); } // New method that returns only the checked paths (totally ignores original @@ -135,7 +136,7 @@ public class JCheckBoxTree extends JTree { return cn.isSelected && cn.hasChildren && !cn.allChildrenSelected; } // Collapses all nodes that have only selected children - public void collapseFullySelectedNodes() { + private void collapseFullySelectedNodes() { // the paths need to be sorted by length, otherwise some nodes will get expanded again // even though they should be collapsed for (Entry<TreePath, CheckedNode> it : nodesCheckingState.entrySet()) { diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java index d54dfa61..29a3d570 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/control/LocationSelector.java @@ -274,10 +274,6 @@ public class LocationSelector extends JPanel { return idList; } - public void collapseFullySelectedNodes() { - locationTree.collapseFullySelectedNodes(); - } - /** * Minimize the given set of TreePath: if all children of an inner node are * selected, remove all child from the result list and just keep the inner @@ -369,7 +365,6 @@ public class LocationSelector extends JPanel { selectedPathsList.add(path); } locationTree.setCheckedState(selectedPathsList, true); - locationTree.collapseFullySelectedNodes(); locationTree.repaint(); } } diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java index e1979c1f..4ce0309f 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/LocationSelectionWindow.java @@ -81,7 +81,6 @@ public class LocationSelectionWindow extends LocationSelectionWindowLayout imple } }); - // btnSaveChanges.setEnabled(false); Gui.centerShellOverShell(modalParent, this); } diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java index 8eebd0bd..7adf10d3 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/page/LectureLocationSelectionPage.java @@ -32,7 +32,6 @@ public class LectureLocationSelectionPage extends LectureLocationSelectionPageLa if (locations != null && locations.size() > Session.getSatelliteConfig().maxLocationsPerLecture) { setErrorMessage("Zu viele Räume/Orte ausgewählt"); ctlLocationSelector.setSelectedLocationsAsIds(locations); - ctlLocationSelector.collapseFullySelectedNodes(); return false; } state.locations = locations; |