Skip to content

Commit

Permalink
Added GUIDialog_ChooserAbstract. Refs eclipse-sumo#6916
Browse files Browse the repository at this point in the history
  • Loading branch information
palvarezlopez committed Oct 16, 2020
1 parent c666b53 commit 0916840
Show file tree
Hide file tree
Showing 8 changed files with 529 additions and 407 deletions.
5 changes: 2 additions & 3 deletions src/gui/GUISUMOViewParent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,8 @@ GUISUMOViewParent::onCmdLocate(FXObject*, FXSelector sel, void*) {
myGLObjChooser.ACChooserJunction->restore();
myGLObjChooser.ACChooserJunction->setFocus();
} else {
myGLObjChooser.ACChooserJunction = new GUIDialog_GLObjChooser(this, nullptr,
GUIIconSubSys::getIcon(GUIIcon::LOCATEJUNCTION),
"Junction Chooser",
myGLObjChooser.ACChooserJunction = new GUIDialog_GLObjChooser(this,
GUIIconSubSys::getIcon(GUIIcon::LOCATEJUNCTION), "Junction Chooser",
static_cast<GUINet*>(GUINet::getInstance())->getJunctionIDs(myParent->listInternal()),
GUIGlObjectStorage::gIDStorage);
}
Expand Down
4 changes: 2 additions & 2 deletions src/netedit/dialogs/GNEDialogACChooser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
// ===========================================================================

GNEDialogACChooser::GNEDialogACChooser(GNEViewParent* viewParent, FXIcon* icon, const std::string& title, const std::vector<GNEAttributeCarrier*>& ACs):
GUIDialog_GLObjChooser(nullptr, viewParent, icon, title.c_str(), std::vector<GUIGlID>(), GUIGlObjectStorage::gIDStorage),
GUIDialog_ChooserAbstract(nullptr, viewParent, icon, title.c_str(), std::vector<GUIGlID>(), GUIGlObjectStorage::gIDStorage),
myACs(ACs),
myFilteredACs(ACs),
myViewParent(viewParent),
Expand Down Expand Up @@ -105,7 +105,7 @@ GNEDialogACChooser::getObjectName(GUIGlObject* o) const {
return tlDef->getID() + " (" + o->getMicrosimID() + ")";
}
} else {
return GUIDialog_GLObjChooser::getObjectName(o);
return GUIDialog_ChooserAbstract::getObjectName(o);
}
}

Expand Down
7 changes: 2 additions & 5 deletions src/netedit/dialogs/GNEDialogACChooser.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@
#pragma once
#include <config.h>

#include <string>
#include <vector>
#include <set>
#include <utils/gui/windows/GUIDialog_GLObjChooser.h>
#include <utils/gui/windows/GUIDialog_ChooserAbstract.h>


// ===========================================================================
Expand All @@ -43,7 +40,7 @@ class GNEViewParent;
* from a given artifact like vehicles, edges or junctions and allow
* one of their items
*/
class GNEDialogACChooser : public GUIDialog_GLObjChooser {
class GNEDialogACChooser : public GUIDialog_ChooserAbstract {

public:
/** @brief Constructor
Expand Down
2 changes: 2 additions & 0 deletions src/utils/gui/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set(utils_gui_windows_STAT_SRCS
GUIPerspectiveChanger.h
GUISUMOAbstractView.cpp
GUISUMOAbstractView.h
GUIDialog_ChooserAbstract.cpp
GUIDialog_ChooserAbstract.h
GUIDialog_GLObjChooser.cpp
GUIDialog_GLObjChooser.h
)
Expand Down
Loading

0 comments on commit 0916840

Please sign in to comment.