Skip to content

Commit

Permalink
Fix combo row selected row not being set properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
ToxicStoxm committed Feb 18, 2025
1 parent b04fabf commit ac2eae4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import com.toxicstoxm.LEDSuite.communication.packet_management.packets.replys.menu_reply.animation_menu.widgets.templates.AnimationMenuActionRowWidget;
import org.gnome.adw.ComboRow;
import org.gnome.glib.Type;
import org.gnome.gtk.Gtk;
import org.gnome.gtk.StringList;
import org.jetbrains.annotations.NotNull;

Expand Down Expand Up @@ -49,7 +48,7 @@ public ComboRow deserialize(@NotNull DeserializableWidget deserializableWidget)
);

widget.setSelected(
getIntIfAvailable(Constants.Communication.YAML.Keys.Reply.MenuReply.VALUE, Gtk.INVALID_LIST_POSITION)
content.indexOf(getStringIfAvailable(Constants.Communication.YAML.Keys.Reply.MenuReply.VALUE, ""))
);

onChanged(() -> sendMenuChangeRequest(String.valueOf(content.get(widget.getSelected()))));
Expand Down

0 comments on commit ac2eae4

Please sign in to comment.