mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-11-02 20:36:44 +00:00
remove keyboard shortcut+pageup/pagedown to switch tabs already added by default
This commit is contained in:
parent
218e751333
commit
36c2181a7f
1 changed files with 1 additions and 12 deletions
|
@ -414,7 +414,7 @@ public class AppController implements Initializable {
|
|||
org.controlsfx.tools.Platform platform = org.controlsfx.tools.Platform.getCurrent();
|
||||
if(platform == org.controlsfx.tools.Platform.OSX) {
|
||||
tabs.getScene().addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
||||
if(event.isShortcutDown() && event.isAltDown()) {
|
||||
if(event.isShortcutDown() && event.isAltDown() && (event.getCode() == KeyCode.LEFT || event.getCode() == KeyCode.RIGHT)) {
|
||||
int currentIndex = tabs.getSelectionModel().getSelectedIndex();
|
||||
if(event.getCode() == KeyCode.LEFT && currentIndex > 0) {
|
||||
tabs.getSelectionModel().select(currentIndex - 1);
|
||||
|
@ -423,17 +423,6 @@ public class AppController implements Initializable {
|
|||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
tabs.getScene().addEventFilter(KeyEvent.KEY_PRESSED, event -> {
|
||||
if(event.isShortcutDown()) {
|
||||
int currentIndex = tabs.getSelectionModel().getSelectedIndex();
|
||||
if(event.getCode() == KeyCode.PAGE_UP && currentIndex > 0) {
|
||||
tabs.getSelectionModel().select(currentIndex - 1);
|
||||
} else if(event.getCode() == KeyCode.PAGE_DOWN && currentIndex < tabs.getTabs().size() - 1) {
|
||||
tabs.getSelectionModel().select(currentIndex + 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue