| Summary: | Navigating to the parent EditPart after ALT+UP and back after ALT+DOWN | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Sergey Vyunnikov <svyunnikov> |
| Component: | GEF-Legacy GEF (MVC) | Assignee: | gef-inbox <gef-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | nyssen |
| Version: | 3.1.1 | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Sergey Vyunnikov
Care to submit a patch? > Care to submit a patch?
I created new KeyHandler class (copy of GraphicalViewerKeyHandler except "navigateOut" method). See code below.
void navigateOut(KeyEvent event) {
if (getFocusEditPart() == null || getFocusEditPart() == getViewer().getContents()
|| getFocusEditPart().getParent() == getViewer().getContents())
return;
//Find parent selectable edit part.
EditPart parentEditPart = getFocusEditPart().getParent();
while (parentEditPart != null && !parentEditPart.isSelectable()) {
parentEditPart = parentEditPart.getParent();
} // while
//If not found nothing to select.
if (parentEditPart != null) {
navigateTo(parentEditPart, event);
} // if
} //navigateOut
I am not sure about the last IF statement because navigateTo method checks if edit part is NULL. Who should care of it? navigateOut or navigateTo? If navigateTo then this IF is useless.
I have created bug #330859, which addresses this problem as well as related problems/inconsistencies within SelectionTool and MarqueeSelectionTool. *** This bug has been marked as a duplicate of bug 330859 *** |