Browse Source

Fix having no last loaded filename for surfaces if no xml file found

Previously the mesh was copied every time `BaseSurface::getMesh()` was called.
master
Krisjanis Rijnieks 9 years ago
parent
commit
9c4f2a5eff
  1. 4
      src/Application/SettingsLoader.cpp
  2. 2
      src/Application/SettingsLoader.h

4
src/Application/SettingsLoader.cpp

@ -12,6 +12,10 @@ SettingsLoader * SettingsLoader::instance(){
return _instance;
}
SettingsLoader::SettingsLoader(){
_lastLoadedFilename = "surfaces.xml";
}
bool SettingsLoader::load(SurfaceStack & surfaces, MediaServer & mediaServer, string fileName){
ofxXmlSettings * xmlSettings = new ofxXmlSettings();

2
src/Application/SettingsLoader.h

@ -21,6 +21,8 @@ class SettingsLoader {
private:
static SettingsLoader * _instance;
SettingsLoader();
BaseSurface * getTriangleSurface(ofxXmlSettings * xmlSettings);
BaseSurface * getQuadSurface(ofxXmlSettings * xmlSettings);

Loading…
Cancel
Save