Skip to content

Commit

Permalink
addendum for automatic overlapped menu. refs #14390
Browse files Browse the repository at this point in the history
  • Loading branch information
namdre committed Mar 13, 2024
1 parent 9de5804 commit b64808b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils/gui/windows/GUISUMOAbstractView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1233,10 +1233,11 @@ GUISUMOAbstractView::openObjectDialogAtCursor(const FXEvent* ev) {
myPopup = GUIGlObjectStorage::gIDStorage.getNetObject()->getPopUpMenu(*myApp, *this);
} else {
std::sort(objectsUnderCursor.begin(), objectsUnderCursor.end(), ComparatorClickPriority());
if (objectsUnderCursor.size() > 1 && (altKeyPressed
|| objectsUnderCursor[0]->getClickPriority() == objectsUnderCursor[1]->getClickPriority())) {
std::vector<GUIGlObject*> filtered = filterContextObjects(objectsUnderCursor);
if (filtered.size() > 1 && (altKeyPressed
|| filtered[0]->getClickPriority() == filtered[1]->getClickPriority())) {
// open dialog for picking among objects (without duplicates)
myPopup = new GUICursorDialog(GUIGLObjectPopupMenu::PopupType::PROPERTIES, this, filterContextObjects(objectsUnderCursor));
myPopup = new GUICursorDialog(GUIGLObjectPopupMenu::PopupType::PROPERTIES, this, filtered);
} else {
myPopup = objectsUnderCursor.front()->getPopUpMenu(*myApp, *this);
}
Expand Down

0 comments on commit b64808b

Please sign in to comment.