Skip to content

Commit

Permalink
fix search in textarea short cut
Browse files Browse the repository at this point in the history
  • Loading branch information
lgajos committed Nov 4, 2020
1 parent e66cb5b commit 1dbf2dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/notepack/MainViewController.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import notepack.encrypt.SimpleAES;
import notepack.noterender.NoteRenderController;
import notepack.noterender.Render;
import notepack.noterender.TextAreaController;

/**
* FXML Controller class
Expand Down Expand Up @@ -416,7 +417,7 @@ public void windowRestore() {
parentStage.getScene().getAccelerators().put(kcSearchReplaceString, () -> {
Tab t = tabContainer.getSelectionModel().getSelectedItem();
Parent p = (Parent) t.getContent();
((NoteTabContentController) t.getUserData()).showSearchReplaceForm();
((TextAreaController) t.getUserData()).showSearchReplaceForm();
});

}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/notepack/noterender/TextAreaController.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import javafx.scene.layout.AnchorPane;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.StageStyle;
import notepack.app.domain.App;
import notepack.app.domain.Note;
import notepack.app.storage.PreferencesSettings;
Expand Down Expand Up @@ -161,6 +162,9 @@ public void replace(String from, String to, boolean replaceAll) {
stage.setTitle("Search/Replace");
stage.setScene(scene);
stage.initModality(Modality.WINDOW_MODAL);
stage.initStyle(StageStyle.UTILITY);
stage.setResizable(false);

stage.show();

} catch (IOException ex) {
Expand Down

0 comments on commit 1dbf2dc

Please sign in to comment.