mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-06-23 08:30:38 +12:00
Fix context menu actions
This commit is contained in:
parent
beb467af5a
commit
10ef67a6ec
|
@ -1,6 +1,7 @@
|
|||
package io.xpipe.app.fxcomps.augment;
|
||||
|
||||
import io.xpipe.app.fxcomps.CompStructure;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.geometry.Side;
|
||||
import javafx.scene.control.ButtonBase;
|
||||
import javafx.scene.control.ContextMenu;
|
||||
|
@ -75,7 +76,11 @@ public class ContextMenuAugment<S extends CompStructure<?>> implements Augment<S
|
|||
});
|
||||
|
||||
if (r instanceof ButtonBase buttonBase && keyEventCheck == null) {
|
||||
buttonBase.setOnAction(event -> {
|
||||
buttonBase.addEventFilter(ActionEvent.ACTION, event -> {
|
||||
if (buttonBase.getOnAction() != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!hide.get()) {
|
||||
var cm = contextMenu.get();
|
||||
if (cm != null) {
|
||||
|
|
Loading…
Reference in a new issue