Commits

Jonathan Giles committed d8c22bd

Make lightweight dialogs modal (e.g. stop execution when showing)

  • Participants
  • Parent commits c62c602

Comments (0)

Files changed (1)

File src/main/java/org/controlsfx/dialog/LightweightDialog.java

 import javafx.stage.Window;
 
 import com.sun.javafx.Utils;
+import com.sun.javafx.tk.Toolkit;
 
 class LightweightDialog extends FXDialog {
 
             originalParent.setEffect(effect);
         }
         
+        
         lightweightDialog.setVisible(true);
         scene.setRoot(dialogStack);
+        Toolkit.getToolkit().enterNestedEventLoop(this);
     }
     
     @Override public void hide() {
         originalParent.getStyleClass().remove("root");
         
         scene.setRoot(originalParent);
+        
+        Toolkit.getToolkit().exitNestedEventLoop(this, null);
     }
 
     @Override BooleanProperty resizableProperty() {