ImageEditor.st
changeset 574 8d82e8f101c1
parent 573 b169cae28157
child 579 0f86dfeb6890
equal deleted inserted replaced
573:b169cae28157 574:8d82e8f101c1
   777                      #(
   777                      #(
   778                        #(#MenuItem
   778                        #(#MenuItem
   779                           #'label:' 'Undo'
   779                           #'label:' 'Undo'
   780                           #'value:' #undo
   780                           #'value:' #undo
   781                           #'activeHelpKey:' #editUndo
   781                           #'activeHelpKey:' #editUndo
       
   782                           #'enabled:' #valueOfCanUndo
   782                       )
   783                       )
   783                        #(#MenuItem
   784                        #(#MenuItem
   784                           #'label:' '-'
   785                           #'label:' '-'
   785                       )
   786                       )
   786                        #(#MenuItem
   787                        #(#MenuItem
  1608 
  1609 
  1609 !ImageEditor methodsFor:'user actions - loading'!
  1610 !ImageEditor methodsFor:'user actions - loading'!
  1610 
  1611 
  1611 loadFromClass
  1612 loadFromClass
  1612 
  1613 
  1613     self loadFromInClassesOf: #Object.
  1614     (self imageEditView loadFromClass) notNil
  1614    
  1615     ifTrue:
       
  1616     [
       
  1617         self image notNil
       
  1618         ifTrue:
       
  1619         [
       
  1620             self listOfColors contents: self image usedColors asSet asOrderedCollection.
       
  1621             self findColorMapMode.
       
  1622             self updateInputFieldsAndLabelsAndHistory.
       
  1623         ]
       
  1624         ifFalse:
       
  1625         [
       
  1626             self updateForNoneImage
       
  1627         ]
       
  1628     ]
  1615 !
  1629 !
  1616 
  1630 
  1617 loadFromFile
  1631 loadFromFile
  1618 
  1632 
  1619     self loadFromFile:
  1633     self loadFromFile:
  1671     [
  1685     [
  1672         self updateForNoneImage
  1686         self updateForNoneImage
  1673     ]
  1687     ]
  1674 !
  1688 !
  1675 
  1689 
  1676 loadFromInClassesOf: aSuperclassOrSymbol
       
  1677 
       
  1678     (self imageEditView loadFromInClassesOf: aSuperclassOrSymbol) notNil
       
  1679     ifTrue:
       
  1680     [
       
  1681         self image notNil
       
  1682         ifTrue:
       
  1683         [
       
  1684             self listOfColors contents: self image usedColors asSet asOrderedCollection.
       
  1685             self findColorMapMode.
       
  1686             self updateInputFieldsAndLabelsAndHistory.
       
  1687         ]
       
  1688         ifFalse:
       
  1689         [
       
  1690             self updateForNoneImage
       
  1691         ]
       
  1692     ]
       
  1693 !
       
  1694 
       
  1695 loadFromMessage: aMessage
  1690 loadFromMessage: aMessage
  1696 
  1691 
  1697     (self imageEditView loadFromMessage: aMessage) notNil
  1692     (self imageEditView loadFromMessage: aMessage) notNil
  1698     ifTrue:
  1693     ifTrue:
  1699     [
  1694     [