Commit dab6cb48 authored by Jan Möbius's avatar Jan Möbius

Light type separated

parent 1d3aa653
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
#include <OpenFlipper/common/RecentFiles.hh> #include <OpenFlipper/common/RecentFiles.hh>
#include <ObjectTypes/Light/Light.hh> //#include <ObjectTypes/Light/Light.hh>
#include <OpenFlipper/ACGHelper/DrawModeConverter.hh> #include <OpenFlipper/ACGHelper/DrawModeConverter.hh>
...@@ -594,12 +594,14 @@ void Core::writeIniFile(QString _filename, ...@@ -594,12 +594,14 @@ void Core::writeIniFile(QString _filename,
file = f->second; file = f->second;
} }
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects // Don't save default light source objects
LightObject* light = 0; LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light ); PluginFunctions::getObject( o_it->id(), light );
if(light != 0) { if(light != 0) {
if(light->defaultLight()) continue; if(light->defaultLight()) continue;
} }
*/
if (QFile(file).exists()){ if (QFile(file).exists()){
// Add a section for this object // Add a section for this object
...@@ -626,12 +628,15 @@ void Core::writeIniFile(QString _filename, ...@@ -626,12 +628,15 @@ void Core::writeIniFile(QString _filename,
// Tell plugins to save their information for the given object // Tell plugins to save their information for the given object
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ; for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objectsEnd(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects // Don't save default light source objects
LightObject* light = 0; LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light ); PluginFunctions::getObject( o_it->id(), light );
if(light != 0) { if(light != 0) {
if(light->defaultLight()) continue; if(light->defaultLight()) continue;
} }
*/
emit iniSave( ini , o_it->id() ); emit iniSave( ini , o_it->id() );
} }
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#include "Core.hh" #include "Core.hh"
#include <ObjectTypes/Light/Light.hh> //#include <ObjectTypes/Light/Light.hh>
/// Save Settings (slot is called from CoreWidget's File-Menu) /// Save Settings (slot is called from CoreWidget's File-Menu)
void Core::saveSettings(){ void Core::saveSettings(){
...@@ -267,6 +267,7 @@ void Core::saveSettings(QString complete_name, bool is_saveObjectInfo, bool is_t ...@@ -267,6 +267,7 @@ void Core::saveSettings(QString complete_name, bool is_saveObjectInfo, bool is_t
} }
} }
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects // Don't save default light source objects
LightObject* light = 0; LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light ); PluginFunctions::getObject( o_it->id(), light );
...@@ -274,6 +275,8 @@ void Core::saveSettings(QString complete_name, bool is_saveObjectInfo, bool is_t ...@@ -274,6 +275,8 @@ void Core::saveSettings(QString complete_name, bool is_saveObjectInfo, bool is_t
if(light->defaultLight()) continue; if(light->defaultLight()) continue;
} }
*/
// Store original file name // Store original file name
originalFiles.insert(filename); originalFiles.insert(filename);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment