AbstractSettingsApplication.st
changeset 9811 6ac0aaf84f1e
parent 9803 ca480beae977
child 9814 9cbbd1c58821
--- a/AbstractSettingsApplication.st	Fri Apr 08 12:01:20 2011 +0200
+++ b/AbstractSettingsApplication.st	Fri Apr 08 12:32:44 2011 +0200
@@ -9174,7 +9174,7 @@
             from:Printer.
     ].
 
-    self printerTypeSelection value:(self possiblePrinters identityIndexOf:Printer).
+    self printerTypeSelection value:(self possiblePrinters identityIndexOf:Printer ifAbsent:1).
     self pageFormatList notEmpty ifTrue:[ self pageFormat value:Printer pageFormat ].
     self printerTypeSelectionOrUnitListChanged.
 
@@ -9378,12 +9378,15 @@
 !
 
 printerTypeSelection
+    |printerIndex|
 
     printerTypeSelection isNil ifTrue:[
-        printerTypeSelection := (self possiblePrinters identityIndexOf:Printer) asValue.
-        printerTypeSelection value == 0 ifTrue:[
-            printerTypeSelection := (self possiblePrinters firstIfEmpty:[self error:'no printer']) asValue.
-        ].
+        printerIndex := self possiblePrinters identityIndexOf:Printer.
+        printerIndex == 0 ifTrue:[
+           self possiblePrinters isEmptyOrNil ifTrue:[self error:'no printer'].
+           printerIndex := 1.
+        ].
+        printerTypeSelection := printerIndex asValue.
 
         printerTypeSelection addDependent:self.
         printerTypeSelection changed.
@@ -16657,9 +16660,9 @@
 !AbstractSettingsApplication class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.384 2011-03-24 14:34:23 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.385 2011-04-08 10:32:44 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.384 2011-03-24 14:34:23 stefan Exp $'
-! !
+    ^ '$Header: /cvs/stx/stx/libtool/AbstractSettingsApplication.st,v 1.385 2011-04-08 10:32:44 stefan Exp $'
+! !