Changeset 8779:d7d5d1d9f65f in orange


Ignore:
Timestamp:
08/25/11 14:37:40 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
25e6788a96455e35059a697e053e5ecfac6150c0
Message:

Prevent saving widget settings in the if the settings were loaded from a schema file.
This prevents a problem when loading an old schema that would completely override the saved
settings for the user (also if the schema is for instance sent from a different user).

References #643.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngCanvasItems.py

    r8147 r8779  
    349349        # save settings 
    350350        if (self.instance != None): 
    351             if self.canvasDlg.menuSaveSettings == 1:        # save settings only if checked in the main menu 
     351            if self.canvasDlg.menuSaveSettings == 1 and not self.instance._settingsFromSchema:        
     352                # save settings only if checked in the main menu, and the widget settings were not loaded from 
     353                # a schema file (i.e it is a new widget, this prevents the overriding of the the global .ini file) 
    352354                try: 
    353355                    self.instance.saveSettings() 
Note: See TracChangeset for help on using the changeset viewer.