oops - need repairDamage for shown to be set (under unix; it used to
authorMichael Beyl <mb@exept.de>
Wed, 10 Jun 2009 19:31:23 +0200
changeset 2560efad0ef440c7
parent 2559 04b2605a66b2
child 2561 e5a66f3365d6
oops - need repairDamage for shown to be set (under unix; it used to
work under win32)
UIPainterView.st
     1.1 --- a/UIPainterView.st	Wed Jun 10 18:26:53 2009 +0200
     1.2 +++ b/UIPainterView.st	Wed Jun 10 19:31:23 2009 +0200
     1.3 @@ -384,7 +384,7 @@
     1.4       if given a single spec, returns that view (sigh - a stupid bw-compatibility kludge)"
     1.5  
     1.6      |sensor specsToPaste pasteOffset builder newSel 
     1.7 -     bounds containerToPasteInto pastePoint beforeIndex|
     1.8 +     bounds containerToPasteInto pastePoint beforeIndex count|
     1.9  
    1.10      treeView askForSelectionChangeAllowed ifFalse:[^ nil].
    1.11  
    1.12 @@ -524,9 +524,12 @@
    1.13      self elementChangedSize:containerToPasteInto.
    1.14  
    1.15      "/ because the new-created view will destroy the handles, when it redraws itself,
    1.16 -    "/ give it a chance to do so, before we return.
    1.17 -    [ (newSel conform:[:v | v shown]) ] whileFalse:[
    1.18 +    "/ give it a chance to do so, before we return. (bail out after half a second, in case of trouble)
    1.19 +    count := 0.
    1.20 +    [ (newSel conform:[:v | v shown]) or:[count > 50] ] whileFalse:[
    1.21 +        self windowGroup repairDamage.
    1.22          Delay waitForSeconds:0.01.
    1.23 +        count := count+1.
    1.24      ].
    1.25      Delay waitForSeconds:0.01.
    1.26      self windowGroup repairDamage.