Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe
Commits:
-
fa4fdc2d
by Tony CHEMIT at 2017-03-30T09:16:27+02:00
-
fbe132a3
by Tony CHEMIT at 2017-03-30T09:20:15+02:00
2 changed files:
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ContentUIHandler.java
- application-swing/src/main/java/fr/ird/observe/application/swing/ui/tree/navigation/NavigationTree.java
Changes:
| ... | ... | @@ -547,7 +547,9 @@ public abstract class ContentUIHandler<E extends IdDto, U extends ContentUI<E, U |
| 547 | 547 |
|
| 548 | 548 |
try {
|
| 549 | 549 |
ok = doDelete(getBean());
|
| 550 |
- |
|
| 550 |
+ if (!ok) {
|
|
| 551 |
+ ui.restartEdit();
|
|
| 552 |
+ }
|
|
| 551 | 553 |
} catch (Exception e) {
|
| 552 | 554 |
UIHelper.handlingError(e);
|
| 553 | 555 |
} finally {
|
| ... | ... | @@ -91,7 +91,7 @@ public class NavigationTree extends JXTree { |
| 91 | 91 |
setSelectionModel(new DefaultTreeSelectionModel() {
|
| 92 | 92 |
@Override
|
| 93 | 93 |
public void setSelectionPath(TreePath path) {
|
| 94 |
- boolean canChange = ObserveSwingApplicationContext.get().getContentUIManager().closeSelectedContentUI();
|
|
| 94 |
+ boolean canChange = !Objects.equals(path, getSelectionPath()) && ObserveSwingApplicationContext.get().getContentUIManager().closeSelectedContentUI();
|
|
| 95 | 95 |
if (!canChange) {
|
| 96 | 96 |
// cancel the change of node
|
| 97 | 97 |
return;
|