Don't save settings which we can't find a value for. This prevents warnings on startup.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 3 Oct 2007 17:41:32 +0000 (17:41 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 3 Oct 2007 17:41:32 +0000 (17:41 +0000)
git-svn-id: http://svn.voria.com/code@828 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/settings.cpp

index 73d927f..e1ee8c6 100644 (file)
@@ -194,7 +194,8 @@ Settings::save_to_file(const synfig::String& filename)const
                        for(iter=key_list.begin();iter!=key_list.end();++iter)
                        {
                                if(!file)return false;
-                               file<<*iter<<'='<<get_value(*iter)<<endl;
+                               String ret = get_value(*iter);
+                               if (ret != String()) file<<*iter<<'='<<ret<<endl;
                        }
                }