Skip to content

Commit

Permalink
[545450] Rename hookScene2(Scene) to hook(Scene).
Browse files Browse the repository at this point in the history
Until further refactoring of TypeStrokeGesture, hook(Scene) is a better name.
  • Loading branch information
mwienand committed Sep 13, 2019
1 parent 428fc27 commit 013adfd
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void changed(
// unhooking it
if (getDomain().getViewers().values().stream().noneMatch(
v -> v.getCanvas().getScene() == oldScene)) {
unhookScene2(oldScene);
unhook(oldScene);
}
}
if (newScene != null) {
Expand All @@ -132,7 +132,7 @@ protected void doDeactivate() {
viewer.viewerFocusedProperty()
.removeListener(viewerFocusChangeListeners.remove(viewer));
Scene scene = viewer.getRootPart().getVisual().getScene();
unhookScene2(scene);
unhook(scene);
}
}

Expand Down Expand Up @@ -299,7 +299,7 @@ public void handle(KeyEvent event) {
scene.addEventFilter(KeyEvent.KEY_TYPED, typedFilter);
}

private void unhookScene2(Scene scene) {
private void unhook(Scene scene) {
if (pressedFilterMap.containsKey(scene)) {
scene.removeEventFilter(KeyEvent.KEY_PRESSED,
pressedFilterMap.remove(scene));
Expand Down

0 comments on commit 013adfd

Please sign in to comment.