Fixed: Popup now disappear if the scene change
This commit is contained in:
@@ -601,6 +601,12 @@ public class MainFXMLController {
|
|||||||
if(!isNowFocused)
|
if(!isNowFocused)
|
||||||
popup.hide();
|
popup.hide();
|
||||||
});
|
});
|
||||||
|
mainScene.getWindow().sceneProperty().addListener((obs, oldScene, newScene) -> {
|
||||||
|
if(newScene!=mainScene)
|
||||||
|
{
|
||||||
|
popup.hide();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showPopup() {
|
private void showPopup() {
|
||||||
|
|||||||
Reference in New Issue
Block a user