Ignore:
Timestamp:
05/15/13 16:58:00 (11 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Handle QFileOpenEvent request events.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/application/canvasmain.py

    r11518 r11522  
    880880        else: 
    881881            return QDialog.Rejected 
     882 
     883    def open_scheme_file(self, filename): 
     884        """ 
     885        Open and load a scheme file. 
     886        """ 
     887        if isinstance(filename, QUrl): 
     888            filename = filename.toLocalFile() 
     889 
     890        document = self.current_document() 
     891        if document.isModifiedStrict(): 
     892            if self.ask_save_changes() == QDialog.Rejected: 
     893                return QDialog.Rejected 
     894 
     895        self.load_scheme(filename) 
     896        return QDialog.Accepted 
    882897 
    883898    def load_scheme(self, filename): 
Note: See TracChangeset for help on using the changeset viewer.