Changeset 7721:bc444fa6611f in orange


Ignore:
Timestamp:
03/02/11 18:25:27 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
bdb2d3a1a862ba58e2e6e111c3c3db74fa2b0abb
Message:
  • update the loadedSettingsDict after loadDocument
  • changed the default dontAskBeforeClose value to False
Location:
orange/OrangeCanvas
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeCanvas/orngCanvas.pyw

    r7711 r7721  
    715715    def loadSettings(self): 
    716716        self.settings = {"widgetListType": 4, "iconSize": "40 x 40", "toolbarIconSize": 2, "toolboxWidth": 200, 'schemeIconSize': 1, 
    717                        "snapToGrid": 1, "writeLogFile": 1, "dontAskBeforeClose": 1, "saveWidgetsPosition": 1, 
     717                       "snapToGrid": 1, "writeLogFile": 1, "dontAskBeforeClose": 0, "saveWidgetsPosition": 1, 
    718718#                       "widgetSelectedColor": (0, 255, 0), "widgetActiveColor": (0, 0, 255), "lineColor": (0, 255, 0), 
    719719                       "reportsDir": self.defaultReportsDir, "saveSchemaDir": self.canvasSettingsDir, "saveApplicationDir": self.canvasSettingsDir, 
  • orange/OrangeCanvas/orngDoc.py

    r7716 r7721  
    6262    # ask the user if he is sure 
    6363    def closeEvent(self,ce): 
    64         newSettings = self.loadedSettingsDict and self.loadedSettingsDict != dict([(widget.caption, widget.instance.saveSettingsStr()) for widget in self.widgets]) 
     64        newSettings = self.isSchemaChanged() 
    6565 
    6666        self.synchronizeContexts() 
     
    454454    # save the file 
    455455    def save(self, filename = None): 
    456         print "Saving to", filename 
    457456        if filename == None: 
    458457            filename = os.path.join(self.schemaPath, self.schemaName) 
     
    582581        if self.widgets: 
    583582            self.signalManager.processNewSignals(self.widgets[0].instance) 
     583             
     584        # Store the loaded settings dict again  
     585        self.loadedSettingsDict = dict((widget.caption, widget.instance.saveSettingsStr()) for widget in self.widgets) 
     586        self.canvasDlg.setWindowModified(False) 
    584587 
    585588        # do we want to restore last position and size of the widget 
Note: See TracChangeset for help on using the changeset viewer.