splitGroup

$canvaseditor splitGroup
splits selected group objects to their single elements.

obj method canvaseditor splitGroup {} {
  set groups [my selection]
  $self select
  lappend undoLines "$self select"
  lappend redoLines "$self select"
  foreach group $groups {
    if {[$group isa group]} then {
      set objects [$group private elements]
      foreach obj $objects {
        $group release $obj
        $self select $obj
        lappend undoLines "$group add $obj"
        lappend redoLines "$group release $obj"
      }
    }
  }
  set undoStr \n[join $undoLines \n]\n
  set redoStr \n[join $redoLines \n]\n
  $self initUndoRedo $undoStr $redoStr
}

© Wolf-Dieter Busch | Home | Sitemap | Urheber | A-Z