changed: #doSaveImageFileAs expeccoNET_1_5_1rc1
authorClaus Gittinger <cg@exept.de>
Mon, 18 Oct 2010 14:25:30 +0200
changeset 2807b89a09017a97
parent 2806 c847d71c11da
child 2808 a417589fc7ac
changed: #doSaveImageFileAs
ImageEditor.st
     1.1 --- a/ImageEditor.st	Mon Oct 18 14:22:22 2010 +0200
     1.2 +++ b/ImageEditor.st	Mon Oct 18 14:25:30 2010 +0200
     1.3 @@ -6219,16 +6219,30 @@
     1.4  
     1.5      filters := FileSelectionBrowser saveImageFileNameFilters.
     1.6  
     1.7 -    file notNil ifTrue:[
     1.8 -        file := FileSelectionBrowser
     1.9 -                    request:'Save Image To'
    1.10 -                    fileName:file
    1.11 -                    withFileFilters:filters.
    1.12 +    (FileSelectionBrowser isNil or:[DirectoryView isNil]) ifTrue:[
    1.13 +        file notNil ifTrue:[
    1.14 +            file := Dialog requestFileName:'Save Image To'
    1.15 +                        default:file
    1.16 +                        pattern:(filters first).
    1.17 +        ] ifFalse:[
    1.18 +            file := Dialog
    1.19 +                        requestFileName:'Save Image To'
    1.20 +                        default:'image.png'
    1.21 +                        pattern:(filters first)
    1.22 +                        fromDirectory:LastDirectory.
    1.23 +        ].
    1.24      ] ifFalse:[
    1.25 -        file := FileSelectionBrowser
    1.26 -                    request:'Save Image To'
    1.27 -                    inDirectory:LastDirectory
    1.28 -                    withFileFilters:filters.
    1.29 +        file notNil ifTrue:[
    1.30 +            file := FileSelectionBrowser
    1.31 +                        request:'Save Image To'
    1.32 +                        fileName:file
    1.33 +                        withFileFilters:filters.
    1.34 +        ] ifFalse:[
    1.35 +            file := FileSelectionBrowser
    1.36 +                        request:'Save Image To'
    1.37 +                        inDirectory:LastDirectory
    1.38 +                        withFileFilters:filters.
    1.39 +        ].
    1.40      ].
    1.41      file notNil ifTrue:[
    1.42          imageEditView saveImageFileAs:file.
    1.43 @@ -6236,6 +6250,8 @@
    1.44          self updateLabelsAndHistory.
    1.45          self clearModified.
    1.46      ]
    1.47 +
    1.48 +    "Modified: / 18-10-2010 / 14:25:17 / cg"
    1.49  !
    1.50  
    1.51  doSaveImageMaskFileAs