diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index cbe0573f3832234c18cfcde6b00a988665d11b82..3cc906eafbea11d915649fbc2cb7c9670b9df4b3 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -194,6 +194,8 @@ MainWindow::MainWindow(QWidget *parent) : //TODO: Maybe this is not longer needed ui.framePerSecondSliderLabel->setVisible(false); ui.contrastSettingSlider->setVisible(false); + //restore the settings + loadAllSettings(); QStringList arguments =QApplication::arguments(); int group=1; // there are max 3 groups of pedestrians @@ -220,13 +222,12 @@ MainWindow::MainWindow(QWidget *parent) : } else if(argument.compare("-online")==0) { slotSetOnlineMode(true); - + Debug::Messages("Online option parsed"); // checking for other possible options [ port...] if(argCount!=arguments.size()-1) { bool ok=false; int port = arguments[++argCount].toInt(&ok); -// Debug:: -// Debug::Messages(" listening port: %d",port); + Debug::Messages(" listening port: %d",port); if (ok) { SystemSettings::setListeningPort(port); @@ -234,7 +235,7 @@ MainWindow::MainWindow(QWidget *parent) : argCount--; // to ensure that the "option" will be checked } } - mayPlay=true; + //mayPlay=true; } else if(argument.startsWith("-")) { const char* std=argument.toStdString().c_str(); @@ -242,15 +243,13 @@ MainWindow::MainWindow(QWidget *parent) : Debug::Error("Usage: ./TraVisTo [file1] [-2D] [-caption] [-online [port] ]"); } else if(addPedestrianGroup(group,argument)) { //slotHelpAbout(); + Debug::Messages("group: %d, arg: %s", group, argument.toStdString().c_str()); group++; mayPlay=true; } } - - //restore the settings - loadAllSettings(); - + Debug::Messages("MayPlay: %s", mayPlay?"True":"False"); // was call from the command line with a file. // disable the online mode if it was enabled if(mayPlay) @@ -812,7 +811,6 @@ void MainWindow::slotFullScreen(bool status) void MainWindow::slotSetOfflineMode(bool status) { - if (status) { ui.actionOnline->setChecked(false); extern_offline_mode = true; diff --git a/src/network/TraVisToServer.cpp b/src/network/TraVisToServer.cpp index 9d9b782d4e1e4b6206653210b3d7d88c37866a4b..2154003347705b342eff206eba2851eccb471a31 100644 --- a/src/network/TraVisToServer.cpp +++ b/src/network/TraVisToServer.cpp @@ -116,7 +116,7 @@ void TraVisToServer::createConnection() tcpServer->setMaxPendingConnections(2); if (!tcpServer->listen(QHostAddress::Any,port)) { - cerr<<"I cant listen to ALL interfaces, sorry"<<endl; + cerr<<"I cant listen to ALL interfaces"<<endl; cerr<<"I will try to listen only the LocalHost (127.0.0.1)"<<endl; if (!tcpServer->listen(QHostAddress::LocalHost,port)) { @@ -134,7 +134,7 @@ void TraVisToServer::createConnection() if(tcpServer->isListening ()) { listening=true; - cerr<<"\nTraVisTo is listening on port "<< tcpServer->serverPort()<<endl; + cerr<<"\nJPSvis is listening on port "<< tcpServer->serverPort()<<endl; } //slotHandleConnection(); }