Skip to content

Commit

Permalink
Merge pull request #96 from m-marini/issue-91
Browse files Browse the repository at this point in the history
Delete key Bug
  • Loading branch information
m-marini committed Feb 22, 2020
2 parents 62551a6 + 1e82e94 commit 4261829
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Issue #84: Clear selection bug
- Issue #87: No vehicle Bug
- Issue #88: Missing title on info panel
- Issue #91: Delete key Bug
- Issue #92: Missing refresh on edge delete

### Changed
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/mmarini/routes/swing/v2/Controller.java
Expand Up @@ -147,7 +147,7 @@ private Controller bindAll() {
new EdgePaneController(edgePane, routeMap, explorerPane, uiStatusObs, this).build();
new MapNodePaneController(nodePane, routeMap, explorerPane, uiStatusObs, this).build();
new ExplorerPaneController(explorerPane, routeMap, mapElementPane, uiStatusSubj, uiStatusObs, this).build();
new KeyController(routeMap, uiStatusObs, this);
new KeyController(routeMap, uiStatusObs, this).build();
return bindOnStatus().bindOnMouseWheel().bindOnModuleSelector();
}

Expand Down Expand Up @@ -378,7 +378,7 @@ private Controller startSimulator() {
* @return
*/
private Controller trafficChanged(final UIStatus uiStatus) {
routeMap.setTraffics(uiStatus.getTraffics());
routeMap.setTraffics(uiStatus.getTraffics());//.requestFocus();
scrollMap.repaint();
return this;
}
Expand Down
Expand Up @@ -148,6 +148,7 @@ private MouseController bindOnDragModule(final Observable<Tuple3<UIStatus, Point
scrollMap.repaint();
uiStatusSubj.onNext(st.setMode(MapMode.ROTATE_MODULE));
}
routeMap.requestFocus();
}, controller::showError);
return this;
}
Expand Down Expand Up @@ -183,6 +184,7 @@ private MouseController bindOnMouseSelection(final Observable<Tuple3<UIStatus, P
controller.centerMapTo(st, t.get2());
mapElementPane.clearSelection();
}
routeMap.requestFocus();
}, controller::showError);
return this;
}
Expand Down Expand Up @@ -225,6 +227,7 @@ private MouseController bindOnRotateModule(final Observable<Tuple3<UIStatus, Poi
return newStatus;
});
}
routeMap.requestFocus();
}, controller::showError);
return this;
}
Expand All @@ -248,6 +251,7 @@ private MouseController bindOnStartEdge(final Observable<Tuple3<UIStatus, Point2
.setSelectedSite(Optional.empty()).setDragEdge(dragEdge);
scrollMap.repaint();
uiStatusSubj.onNext(st.setDragEdge(dragEdge).setMode(MapMode.DRAG_EDGE));
routeMap.requestFocus();
}, controller::showError);
return this;
}
Expand Down

0 comments on commit 4261829

Please sign in to comment.