Skip to content

Commit

Permalink
Now GNEDialog_About shows a warning in testing mode when is opened. R…
Browse files Browse the repository at this point in the history
…efs #3045

git-svn-id: file:///home/behr_mi/git/sumo_synched/trunk@24210 afbd958f-9f77-42d5-a016-97a22340ccf4
  • Loading branch information
palvarezlopez committed May 6, 2017
1 parent 8c416a7 commit 92d6848
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
13 changes: 11 additions & 2 deletions sumo/src/netedit/GNEApplicationWindow.cpp
Expand Up @@ -796,9 +796,18 @@ GNEApplicationWindow::onCmdClearMsgWindow(FXObject*, FXSelector, void*) {

long
GNEApplicationWindow::onCmdAbout(FXObject*, FXSelector, void*) {
// write warning if netedit is running in testing mode
if ((myNet != NULL) && (myNet->getViewNet()->isTestingModeEnabled() == true)) {
WRITE_WARNING("Opening about dialog");
}
// create and open about dialog
GNEDialog_About* about = new GNEDialog_About(this);
about->create();
about->show(PLACEMENT_OWNER);
// write warning if netedit is running in testing mode
if ((myNet != 0) && (myNet->getViewNet()->isTestingModeEnabled() == true)) {
WRITE_WARNING("Closed about dialog");
}
return 1;
}

Expand Down Expand Up @@ -1106,7 +1115,7 @@ GNEApplicationWindow::onCmdComputeJunctions(FXObject*, FXSelector, void*) {
long
GNEApplicationWindow::onCmdComputeJunctionsVolatile(FXObject*, FXSelector, void*) {
// write warning if netedit is running in testing mode
if (myNet->getViewNet()->isTestingModeEnabled() == true) {
if ((myNet != NULL) && (myNet->getViewNet()->isTestingModeEnabled() == true)) {
WRITE_WARNING("Opening FXMessageBox of type 'question'");
}
// open question dialog box
Expand All @@ -1125,7 +1134,7 @@ GNEApplicationWindow::onCmdComputeJunctionsVolatile(FXObject*, FXSelector, void*
myNet->computeEverything(this, true, true);
updateControls();
// write warning if netedit is running in testing mode
if (myNet->getViewNet()->isTestingModeEnabled() == true) {
if ((myNet != NULL) && (myNet->getViewNet()->isTestingModeEnabled() == true)) {
WRITE_WARNING("Closed FXMessageBox of type 'question' with 'Yes'");
}
return 1;
Expand Down
5 changes: 4 additions & 1 deletion sumo/src/netedit/GNEDialog_About.cpp
Expand Up @@ -75,8 +75,11 @@ GNEDialog_About::GNEDialog_About(FXWindow* parent) :
// centered ok-button
FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
new FXButton(buttonFrame, "OK\t\t", GUIIconSubSys::getIcon(ICON_ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK);
FXButton* OKButton = new FXButton(buttonFrame, "&OK\t\t", GUIIconSubSys::getIcon(ICON_ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK);
new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);

// focus OK button
OKButton->setFocus();
}


Expand Down

0 comments on commit 92d6848

Please sign in to comment.