yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #00908
[svn] r1647 - in trunk: gui/qt3 pkg/snow/RenderingEngine
Author: cosurgi
Date: 2009-01-27 04:21:29 +0100 (Tue, 27 Jan 2009)
New Revision: 1647
Modified:
trunk/gui/qt3/SimulationController.cpp
trunk/gui/qt3/YadeQtMainWindow.hpp
trunk/pkg/snow/RenderingEngine/Ef1_IstSnowLayersContact_glDraw.hpp
Log:
postpone creating a 3d view, until a file is loaded. That should hopefully fix the problem with the primary view being empty.
Modified: trunk/gui/qt3/SimulationController.cpp
===================================================================
--- trunk/gui/qt3/SimulationController.cpp 2009-01-27 02:19:40 UTC (rev 1646)
+++ trunk/gui/qt3/SimulationController.cpp 2009-01-27 03:21:29 UTC (rev 1647)
@@ -73,7 +73,7 @@
scrollView->addChild(scrollViewFrame);
maxNbViews=0;
- addNewView();
+ //addNewView(); // postpone until a file is loaded
// there is file existence assertion in lodSimulationFromFilename, so yade will abort cleanly...
LOG_DEBUG("Omega's simulation filename: `"<<Omega::instance().getSimulationFileName()<<"'");
@@ -197,6 +197,7 @@
}
if(center) pbCenterSceneClicked();
+ if(YadeQtMainWindow::self->viewsSize() == 0) addNewView();
}
void SimulationController::pbSaveClicked()
Modified: trunk/gui/qt3/YadeQtMainWindow.hpp
===================================================================
--- trunk/gui/qt3/YadeQtMainWindow.hpp 2009-01-27 02:19:40 UTC (rev 1646)
+++ trunk/gui/qt3/YadeQtMainWindow.hpp 2009-01-27 03:21:29 UTC (rev 1647)
@@ -35,6 +35,7 @@
void createView();
void closeView(GLViewer*);
void closeView(int);
+ size_t viewsSize(){return glViews.size();};
void centerViews();
void adjustCameraInCurrentView(qglviewer::Vec up,qglviewer::Vec dir);
void loadSimulation(string file);
Modified: trunk/pkg/snow/RenderingEngine/Ef1_IstSnowLayersContact_glDraw.hpp
===================================================================
--- trunk/pkg/snow/RenderingEngine/Ef1_IstSnowLayersContact_glDraw.hpp 2009-01-27 02:19:40 UTC (rev 1646)
+++ trunk/pkg/snow/RenderingEngine/Ef1_IstSnowLayersContact_glDraw.hpp 2009-01-27 03:21:29 UTC (rev 1647)
@@ -4,7 +4,8 @@
#include<yade/pkg-common/GLDrawFunctors.hpp>
-class Ef1_IstSnowLayersContact_glDraw : public GLDrawInteractionGeometryFunctor{
+class Ef1_IstSnowLayersContact_glDraw : public GLDrawInteractionGeometryFunctor
+{
public :
Ef1_IstSnowLayersContact_glDraw(){}
virtual void go(const shared_ptr<InteractionGeometry>&,const shared_ptr<Interaction>&,const shared_ptr<Body>&,const shared_ptr<Body>&,bool wireFrame);