mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-27 02:40:51 +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.install(exitButton,delete);
|
||||
exitButton.show();
|
||||
exitButton.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> item.isRemoveClickTrigger());
|
||||
clickButton = new SimpleClickButton();
|
||||
clickButton.show();
|
||||
clickButton.addEventHandler(MouseEvent.MOUSE_CLICKED, event -> item.isClickTrigger());
|
||||
|
||||
buttonsBox = new HBox(clickButton, exitButton);
|
||||
|
||||
|
@ -291,9 +291,7 @@ public class Extensions extends SubForm {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
extension.onClick(observable -> {
|
||||
extension.sendMessage(new HPacket(OUTGOING_MESSAGES_IDS.ONDOUBLECLICK));
|
||||
});
|
||||
extension.onClick(observable -> extension.sendMessage(new HPacket(OUTGOING_MESSAGES_IDS.ONDOUBLECLICK)));
|
||||
|
||||
Platform.runLater(() -> producer.extensionConnected(extension));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user