Skip to content

Commit d795540

Browse files
committed
Merge branch 'develop' into feature/windowsAndDownToMinimize
2 parents e582637 + 5edfaa2 commit d795540

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/main/java/de/doubleslash/keeptime/view/ViewController.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ public void changeProject(final Project newProject, final long minusSeconds) {
165165
controller.changeProject(newProject, minusSeconds);
166166
updateProjectView();
167167
textArea.setText("");
168+
textArea.requestFocus();
168169
}
169170

170171
private final Map<Project, Label> elapsedProjectTimeLabelMap = new HashMap<>();
@@ -371,6 +372,7 @@ private void settingsClicked() {
371372
private void calendarClicked() {
372373
LOG.info("Calendar clicked");
373374
this.mainStage.setAlwaysOnTop(false);
375+
reportStage.setAlwaysOnTop(true);
374376
reportController.update();
375377
reportStage.show();
376378
}
@@ -463,7 +465,10 @@ private void loadSubStages() {
463465
reportStage.setScene(reportScene);
464466
reportStage.setTitle("Report");
465467
reportStage.setResizable(false);
466-
reportStage.setOnHiding(windowEvent -> this.mainStage.setAlwaysOnTop(true));
468+
reportStage.setOnHiding(windowEvent -> {
469+
reportStage.setAlwaysOnTop(false);
470+
this.mainStage.setAlwaysOnTop(true);
471+
});
467472

468473
// Settings stage
469474
final FXMLLoader fxmlLoader2 = createFXMLLoader(RESOURCE.FXML_SETTINGS);
@@ -796,5 +801,4 @@ public void addNewProject(final ActionEvent ae) {
796801
realignProjectList();
797802
});
798803
}
799-
800804
}

src/main/java/de/doubleslash/keeptime/viewpopup/ViewControllerPopup.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public class ViewControllerPopup {
4848

4949
@FXML
5050
private TextField searchTextField;
51+
5152
@FXML
5253
private ListView<Project> projectListView;
5354

@@ -69,9 +70,10 @@ private void changeProject(final Project item) {
6970
"Add a note for '" + model.activeWorkItem.get().getProject().getName() + "' before changing project?");
7071
dialog.setContentText("Note: ");
7172

72-
this.stage.setAlwaysOnTop(false);
73+
final Stage dialogStage = (Stage) dialog.getDialogPane().getScene().getWindow();
74+
dialogStage.setAlwaysOnTop(true);
75+
7376
final Optional<String> result = dialog.showAndWait();
74-
this.stage.setAlwaysOnTop(true);
7577

7678
result.ifPresent(note -> {
7779
controller.setComment(note);

0 commit comments

Comments
 (0)