File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
src/main/java/de/doubleslash/keeptime Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,7 @@ private void initialisePopupUI(final Stage primaryStage) throws IOException {
221221 // Give the controller access to the main app.
222222 popupViewStage .setAlwaysOnTop (true );
223223 final ViewControllerPopup viewControllerPopupController = loader .getController ();
224+ viewControllerPopupController .setMainStage (primaryStage );
224225 viewControllerPopupController .setStage (popupViewStage );
225226 viewControllerPopupController .setControllerAndModel (controller , model );
226227 globalScreenListener .setViewController (viewControllerPopupController );
Original file line number Diff line number Diff line change @@ -52,13 +52,18 @@ public class ViewControllerPopup {
5252 private ListView <Project > projectListView ;
5353
5454 private Stage stage ;
55+ private Stage mainStage ;
5556
5657 private Controller controller ;
5758
5859 private Model model ;
5960
6061 private FilteredList <Project > filteredData ;
6162
63+ public void setMainStage (final Stage mainStage ) {
64+ this .mainStage = mainStage ;
65+ }
66+
6267 private void changeProject (final Project item ) {
6368 LOG .info ("Change project to '{}'." , item .getName ());
6469
@@ -69,9 +74,11 @@ private void changeProject(final Project item) {
6974 "Add a note for '" + model .activeWorkItem .get ().getProject ().getName () + "' before changing project?" );
7075 dialog .setContentText ("Note: " );
7176
72- this .stage .setAlwaysOnTop (false );
73- final Optional <String > result = dialog .showAndWait ();
77+ mainStage .setAlwaysOnTop (false );
7478 this .stage .setAlwaysOnTop (true );
79+ final Optional <String > result = dialog .showAndWait ();
80+ this .stage .setAlwaysOnTop (false );
81+ mainStage .setAlwaysOnTop (true );
7582
7683 result .ifPresent (note -> {
7784 controller .setComment (note );
You can’t perform that action at this time.
0 commit comments