Changeset 5028


Ignore:
Timestamp:
Feb 17, 2015, 5:37:11 PM (5 years ago)
Author:
ldelgass
Message:

Honor insert position for adding tabs to sidebar: was hard-coded to append to
the end.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/sidebarframe.tcl

    r3782 r5028  
    247247    }
    248248
    249     $itk_component(tabs) insert end $pname \
     249    $itk_component(tabs) insert $pos $pname \
    250250        -image $panel(-icon) -text "" -padx 0 -pady 0 \
    251251        -command [itcl::code $this _toggleTab $pname]
     
    264264
    265265    set _panels($pname-title) $panel(-title)
    266     lappend _panels(all) $pname
     266    if { ![info exists _panels(all)] || $pos == "end" } {
     267        lappend _panels(all) $pname
     268    } else {
     269        set _panels(all) [linsert $_panels(all) $pos $pname]
     270    }
    267271    if {$_selected == ""} {
    268272        set _selected $pname
Note: See TracChangeset for help on using the changeset viewer.