mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-23 08:30:38 +12:00
Fix popover double show
This commit is contained in:
parent
fd629c62bc
commit
568d1c2e6f
|
@ -206,7 +206,12 @@ public class DataStoreChoiceComp<T extends DataStore> extends SimpleComp {
|
|||
16);
|
||||
struc.get().setGraphic(graphic.createRegion());
|
||||
struc.get().setOnAction(event -> {
|
||||
getPopover().show(struc.get());
|
||||
if (popover == null || !popover.isShowing()) {
|
||||
var p = getPopover();
|
||||
p.show(struc.get());
|
||||
} else {
|
||||
popover.hide();
|
||||
}
|
||||
event.consume();
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue