mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
fix bug where listener got registered twice
This commit is contained in:
parent
3636c42245
commit
d1bbb3cb52
@ -79,10 +79,8 @@ public class ExtensionItemContainer extends GridPane {
|
|||||||
Tooltip delete = new Tooltip("Close connection with this extension");
|
Tooltip delete = new Tooltip("Close connection with this extension");
|
||||||
Tooltip.install(exitButton,delete);
|
Tooltip.install(exitButton,delete);
|
||||||
exitButton.show();
|
exitButton.show();
|
||||||
exitButton.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> item.isRemoveClickTrigger());
|
|
||||||
clickButton = new SimpleClickButton();
|
clickButton = new SimpleClickButton();
|
||||||
clickButton.show();
|
clickButton.show();
|
||||||
clickButton.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> item.isClickTrigger());
|
|
||||||
|
|
||||||
buttonsBox = new HBox(clickButton, exitButton);
|
buttonsBox = new HBox(clickButton, exitButton);
|
||||||
|
|
||||||
|
@ -291,9 +291,7 @@ public class Extensions extends SubForm {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
extension.onClick(observable -> {
|
extension.onClick(observable -> extension.sendMessage(new HPacket(OUTGOING_MESSAGES_IDS.ONDOUBLECLICK)));
|
||||||
extension.sendMessage(new HPacket(OUTGOING_MESSAGES_IDS.ONDOUBLECLICK));
|
|
||||||
});
|
|
||||||
|
|
||||||
Platform.runLater(() -> producer.extensionConnected(extension));
|
Platform.runLater(() -> producer.extensionConnected(extension));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user