mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 00:40:51 +01:00
Merge pull request #130 from WiredSpast/master
Bugfix: Set G-Earth as owner of all alerts
This commit is contained in:
commit
630c43b07a
@ -16,6 +16,7 @@ import javafx.application.Platform;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
@ -166,4 +167,8 @@ public class GEarth extends Application {
|
||||
public static Theme getTheme() {
|
||||
return observableTheme.getObject();
|
||||
}
|
||||
|
||||
public static void setAlertOwner(Alert alert) {
|
||||
alert.initOwner(main.stage);
|
||||
}
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ public class TitleBarController {
|
||||
}
|
||||
|
||||
public static TitleBarController create(Alert alert) throws IOException {
|
||||
GEarth.setAlertOwner(alert);
|
||||
|
||||
FXMLLoader loader = new FXMLLoader(TitleBarController.class.getResource("Titlebar.fxml"));
|
||||
Parent titleBar = loader.load();
|
||||
|
Loading…
Reference in New Issue
Block a user