@@ -35,7 +35,7 @@ namespace ICSharpCode.SharpDevelop.Project
3535 class Solution : SolutionFolder , ISolution
3636 {
3737 FileName fileName ;
38- FileName globalSettingsFileName ;
38+ FileName sdSettingsFileName ;
3939 DirectoryName directory ;
4040 readonly IProjectChangeWatcher changeWatcher ;
4141 readonly IFileService fileService ;
@@ -52,7 +52,7 @@ public Solution(FileName fileName, IProjectChangeWatcher changeWatcher, IFileSer
5252 this . PlatformNames = new SolutionConfigurationOrPlatformNameCollection ( this , true ) ;
5353 this . projects = new SynchronizedModelCollection < IProject > ( new ProjectModelCollection ( this ) ) ;
5454 this . FileName = fileName ;
55- this . globalSettingsFileName = new FileName ( fileName + ".sdsettings" ) ;
55+ this . sdSettingsFileName = new FileName ( fileName + ".sdsettings" ) ;
5656 base . Name = fileName . GetFileNameWithoutExtension ( ) ;
5757
5858 this . globalSections = new SynchronizedModelCollection < SolutionSection > ( new NullSafeSimpleModelCollection < SolutionSection > ( ) ) ;
@@ -281,11 +281,11 @@ public Properties Preferences {
281281 get { return preferences ; }
282282 }
283283
284- Properties globalPreferences = new Properties ( ) ;
284+ Properties sdSettings = new Properties ( ) ;
285285
286286 [ Browsable ( false ) ]
287- public Properties GlobalPreferences {
288- get { return globalPreferences ; }
287+ public Properties SDSettings {
288+ get { return sdSettings ; }
289289 }
290290
291291 string GetPreferencesKey ( )
@@ -297,7 +297,7 @@ internal void LoadPreferences()
297297 {
298298 try {
299299 preferences = SD . PropertyService . LoadExtraProperties ( GetPreferencesKey ( ) ) ;
300- globalPreferences = Properties . Load ( globalSettingsFileName ) ;
300+ sdSettings = Properties . Load ( sdSettingsFileName ) ;
301301 } catch ( IOException ) {
302302 } catch ( XmlException ) {
303303 // ignore errors about inaccessible or malformed files
@@ -321,7 +321,9 @@ public void SavePreferences()
321321
322322 try {
323323 SD . PropertyService . SaveExtraProperties ( GetPreferencesKey ( ) , preferences ) ;
324- globalPreferences . Save ( globalSettingsFileName ) ;
324+ if ( sdSettings . IsDirty ) {
325+ sdSettings . Save ( sdSettingsFileName ) ;
326+ }
325327 } catch ( IOException ) {
326328 // ignore errors writing to extra properties
327329 }
0 commit comments