Skip to content

Commit

Permalink
Fixed animation menus breaking after unselecting them
Browse files Browse the repository at this point in the history
  • Loading branch information
ToxicStoxm committed Aug 12, 2024
1 parent c903776 commit 8a0427a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/com/toxicstoxm/LEDSuite/ui/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,14 @@ private void populateSidebar() {

LEDSuite.logger.verbose("Creating handlers...");
@NonNull ListBox finalSidebarAnimationSection = sidebarAnimationSection;
sidebarFileSection.onRowActivated(_ -> {
sidebarFileSection.onRowActivated(row -> {
if (!TimeManager.call("sidebarClickDebounce")) {
sidebarFileSection.setSelectionMode(SelectionMode.NONE);
sidebarFileSection.setSelectionMode(SelectionMode.BROWSE);
return;
}
if (current.get() == row) return;
current.set(row);
controlButtonsRevealer.setRevealChild(false);
LEDSuite.logger.verbose("Clicked add file row!");
mainContentRevealer.setRevealChild(false);
Expand All @@ -300,14 +302,13 @@ private void populateSidebar() {

@NonNull ListBox finalSidebarAnimationSection1 = sidebarAnimationSection;
sidebarAnimationSection.onRowActivated(row -> {
controlButtonsRevealer.setRevealChild(true);
if (current.get() == row) return;
if (!TimeManager.call("sidebarClickDebounce")) {
finalSidebarAnimationSection1.setSelectionMode(SelectionMode.NONE);
finalSidebarAnimationSection1.unselectAll();
finalSidebarAnimationSection1.setSelectionMode(SelectionMode.BROWSE);
return;
}
if (current.get() == row) return;
controlButtonsRevealer.setRevealChild(true);
current.set(row);
if (!row.getSelectable()) return;
if (contentBox.getFirstChild() != null) {
Expand Down

0 comments on commit 8a0427a

Please sign in to comment.