diff --git a/src/netedit/GNEApplicationWindow.cpp b/src/netedit/GNEApplicationWindow.cpp index 549a220679c..8210b0dfd2f 100644 --- a/src/netedit/GNEApplicationWindow.cpp +++ b/src/netedit/GNEApplicationWindow.cpp @@ -1792,6 +1792,7 @@ GNEApplicationWindow::computeJunctionWithVolatileOptions() { } } + bool GNEApplicationWindow::consoleOptionsLoaded() { if (myConsoleOptionsLoaded) { @@ -1803,6 +1804,11 @@ GNEApplicationWindow::consoleOptionsLoaded() { } +void +GNEApplicationWindow::viewUpdated() { +} + + long GNEApplicationWindow::onCmdSetSuperMode(FXObject* sender, FXSelector sel, void* ptr) { // check that currently there is a View diff --git a/src/netedit/GNEApplicationWindow.h b/src/netedit/GNEApplicationWindow.h index 7c3e1aa97ae..0d85f95a3ef 100644 --- a/src/netedit/GNEApplicationWindow.h +++ b/src/netedit/GNEApplicationWindow.h @@ -81,6 +81,9 @@ class GNEApplicationWindow : public GUIMainWindow, public MFXInterThreadEventCli /// @brief check if console options was already loaded bool consoleOptionsLoaded(); + /// @brief called when view is updated + void viewUpdated(); + /// @name Inter-thread event handling /// @{ /// @brief called when an event occurred diff --git a/src/netedit/GNEApplicationWindowHelper.cpp b/src/netedit/GNEApplicationWindowHelper.cpp index 0ec37639cdc..7a6e5e69054 100644 --- a/src/netedit/GNEApplicationWindowHelper.cpp +++ b/src/netedit/GNEApplicationWindowHelper.cpp @@ -2200,6 +2200,20 @@ GNEApplicationWindowHelper::ViewsMenuCommands::setView(FXSelector sel) { myDefaultView->setCheck(FALSE); myJuPedSimView->setCheck(TRUE); } + // update GNEApp + myGNEApp->viewUpdated(); +} + + +bool +GNEApplicationWindowHelper::ViewsMenuCommands::isDefaultView() const { + return myDefaultView->getCheck() == TRUE; +} + + +bool +GNEApplicationWindowHelper::ViewsMenuCommands::isJuPedSimView() const { + return myJuPedSimView->getCheck() == TRUE; } // --------------------------------------------------------------------------- diff --git a/src/netedit/GNEApplicationWindowHelper.h b/src/netedit/GNEApplicationWindowHelper.h index 0a6261a0770..8ee251b9aa8 100644 --- a/src/netedit/GNEApplicationWindowHelper.h +++ b/src/netedit/GNEApplicationWindowHelper.h @@ -1080,6 +1080,12 @@ struct GNEApplicationWindowHelper { /// @brief set view void setView(FXSelector sel); + /// @brief check if default view is enabled + bool isDefaultView() const; + + /// @brief check if default view is enabled + bool isJuPedSimView() const; + private: /// @brief pointer to current GNEApplicationWindow GNEApplicationWindow* myGNEApp; @@ -1152,6 +1158,9 @@ struct GNEApplicationWindowHelper { /// @brief hide all menu commands void hideSupermodeCommands(); + /// @brief called when user update view + void viewUpdated(); + /// @brief FXMenuCommand for network supermode FXMenuCommand* networkMode = nullptr; diff --git a/src/netedit/GNEViewNetHelper.h b/src/netedit/GNEViewNetHelper.h index be5d479cd4c..0f430a2e207 100644 --- a/src/netedit/GNEViewNetHelper.h +++ b/src/netedit/GNEViewNetHelper.h @@ -110,7 +110,7 @@ enum class DemandEditMode { DEMAND_CONTAINERPLAN }; -/// @brie enum for data edit modes +/// @brief enum for data edit modes enum class DataEditMode { /// @brief empty Data mode DATA_NONE,