Changeset 11197:629ac047bc70 in orange


Ignore:
Timestamp:
11/22/12 19:12:05 (17 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Use scheme title as the default filename on first save.

File:
1 edited

Legend:

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

    r11194 r11197  
    994994        if curr_scheme.path: 
    995995            start_dir = curr_scheme.path 
    996         elif self.last_scheme_dir is not None: 
    997             start_dir = self.last_scheme_dir 
    998996        else: 
    999             start_dir = QDesktopServices.storageLocation( 
    1000                             QDesktopServices.DocumentsLocation) 
     997            if self.last_scheme_dir is not None: 
     998                start_dir = self.last_scheme_dir 
     999            else: 
     1000                start_dir = QDesktopServices.storageLocation( 
     1001                    QDesktopServices.DocumentsLocation 
     1002                ) 
     1003 
     1004            title = curr_scheme.title or "untitled" 
     1005            start_dir = os.path.join(unicode(start_dir), title + ".ows") 
    10011006 
    10021007        filename = QFileDialog.getSaveFileName( 
Note: See TracChangeset for help on using the changeset viewer.