From 47e7697281d0933dbd276a714d000bbce42f66f1 Mon Sep 17 00:00:00 2001 From: Ulrich Kemloh <kemlohulrich@gmail.com> Date: Tue, 7 Jul 2015 16:15:40 +0200 Subject: [PATCH] fixed crash when chaning the number of agents in online mode --- src/MainWindow.cpp | 12 +++++------- src/MainWindow.h | 2 +- src/ThreadVisualisation.cpp | 3 ++- src/geometry/FacilityGeometry.cpp | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 0dfbd32..f23550a 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -633,8 +633,6 @@ bool MainWindow::slotAddDataSet() void MainWindow::slotClearAllDataset() { clearDataSet(1); - clearDataSet(2); - clearDataSet(3); numberOfDatasetLoaded=0; } @@ -1211,7 +1209,7 @@ void MainWindow::clearDataSet(int ID) if(numberOfDatasetLoaded<0)numberOfDatasetLoaded=0; //finally clear the geometry - slotClearGeometry(); + //slotClearGeometry(); } void MainWindow::resetAllFrameCursor() @@ -1578,10 +1576,10 @@ void MainWindow::slotSetCameraPerspectiveToVirtualAgent() } /// @todo does it work? mem check? -void MainWindow::slotClearGeometry() -{ - _visualisationThread->setGeometry(NULL); -} +//void MainWindow::slotClearGeometry() +//{ +// _visualisationThread->setGeometry(NULL); +//} void MainWindow::slotErrorOutput(QString err) { diff --git a/src/MainWindow.h b/src/MainWindow.h index af30864..21240f6 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -146,7 +146,7 @@ public Q_SLOTS: /// load a geometry file and display it //void slotLoadGeometry( ); - void slotClearGeometry(); + //void slotClearGeometry(); //void slotLoadParseShowGeometry(QString fileName); /// load a geometry sent by the data transfer thread diff --git a/src/ThreadVisualisation.cpp b/src/ThreadVisualisation.cpp index 651bcb1..305681a 100644 --- a/src/ThreadVisualisation.cpp +++ b/src/ThreadVisualisation.cpp @@ -287,7 +287,7 @@ void ThreadVisualisation::run() } - if(false || SystemSettings::get2D()) { + if(SystemSettings::get2D()) { _renderer->GetActiveCamera()->OrthogonalizeViewUp(); _renderer->GetActiveCamera()->ParallelProjectionOn(); _renderer->ResetCamera(); @@ -655,6 +655,7 @@ void ThreadVisualisation::init() void ThreadVisualisation::finalize() { + } void ThreadVisualisation::QcolorToDouble(const QColor &col, double *rgb) diff --git a/src/geometry/FacilityGeometry.cpp b/src/geometry/FacilityGeometry.cpp index c3cf7e0..ed9966a 100644 --- a/src/geometry/FacilityGeometry.cpp +++ b/src/geometry/FacilityGeometry.cpp @@ -852,7 +852,7 @@ string text, double color) //tprop->BoldOn(); //tprop->ShadowOn(); //tprop->SetLineSpacing(1.0); - tprop->SetFontSize(SystemSettings::getPedestrianCaptionSize()); + tprop->SetFontSize(SystemSettings::getPedestrianCaptionSize()/2); double colorRGB[3]; lookupTable->GetColor(color, colorRGB); -- GitLab