Skip to content

Commit

Permalink
FIXED: Issue #77 Shortcut UNDO Display on mac
Browse files Browse the repository at this point in the history
RootLayoutController.java initialize()
  • Loading branch information
Grahaam committed Dec 17, 2022
1 parent 3a34abc commit ac99ee4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public StringBuilder buildRemplacementCategoryMessage(ConcreteCategory sourceCat
message.append(' ').append(Configuration.langBundle.getString("merge_be_replaced")).append(' ');
message.append('"').append(sourceProperty.getValue()).append("\"\n");
});
if (message.isEmpty()) {
if (message.toString().isEmpty()) {
message.append('\t').append(Configuration.langBundle.getString("merge_empty_category_replacement")).append('\n');
}
return message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,14 @@ public void initialize(URL location, ResourceBundle resources) {
final KeyCodeCombination keyCombREDO = new KeyCodeCombination(KeyCode.Y, KeyCombination.SHORTCUT_DOWN);
final KeyCodeCombination keyCombSAVE = new KeyCodeCombination(KeyCode.S, KeyCombination.SHORTCUT_DOWN);
final KeyCodeCombination keyCombNEW = new KeyCodeCombination(KeyCode.N, KeyCombination.SHORTCUT_DOWN);
final KeyCodeCombination keyCombUNDO;
final KeyCodeCombination keyCombUNDO = new KeyCodeCombination(KeyCode.Z, KeyCombination.SHORTCUT_DOWN);
InputContext context = InputContext.getInstance();
String loc = context.getLocale().toString();
System.out.println(loc);
// javafx keyboard layout bug management
System.out.println(loc);

// javafx keyboard layout bug management
//update 2022-17-12 : this block shouldn't be necessary anymore
/*
if (OS.current == OS.mac) {
System.out.println("keyboard mac os");
switch (loc) {
Expand Down Expand Up @@ -344,7 +346,7 @@ public void initialize(URL location, ResourceBundle resources) {
else {
keyCombUNDO = new KeyCodeCombination(KeyCode.Z, KeyCodeCombination.SHORTCUT_DOWN);
}

*/
undo.setAccelerator(keyCombUNDO);
redo.setAccelerator(keyCombREDO);
saveProject.setAccelerator(keyCombSAVE);
Expand Down

0 comments on commit ac99ee4

Please sign in to comment.