Fix double click setting

This commit is contained in:
crschnick 2024-07-26 08:46:16 +00:00
parent bfee4d8edc
commit 4a84c07c56

View file

@ -106,7 +106,7 @@ public abstract class StoreEntryComp extends SimpleComp {
});
button.addEventFilter(MouseEvent.MOUSE_CLICKED, event -> {
if (AppPrefs.get().requireDoubleClickForConnections().get()) {
if (event.getButton() == MouseButton.PRIMARY && event.getClickCount() > 2) {
if (event.getButton() == MouseButton.PRIMARY && event.getClickCount() != 2) {
event.consume();
}
} else {
@ -117,7 +117,7 @@ public abstract class StoreEntryComp extends SimpleComp {
});
button.addEventFilter(MouseEvent.MOUSE_PRESSED, event -> {
if (AppPrefs.get().requireDoubleClickForConnections().get()) {
if (event.getButton() == MouseButton.PRIMARY && event.getClickCount() > 2) {
if (event.getButton() == MouseButton.PRIMARY && event.getClickCount() != 2) {
event.consume();
}
} else {