Ignore:
Timestamp:
Oct 1, 2013 6:57:24 PM (11 years ago)
Author:
gah
Message:

fix visibility for newly added markers

File:
1 edited

Legend:

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

    r3941 r3970  
    4141    private method GetScreenPosition { name }
    4242    private method LeaveTick { name }
    43     private method NewMarker { x y }
     43    private method NewMarker { x y state }
    4444    private method SetRelativeValue  { name x }
    4545    private method GetRelativeValue  { name }
     
    7070    set _name $name
    7171    set _limits [list 0.0 1.0]
    72     $c bind transfunc <ButtonRelease-1> [itcl::code $this NewMarker %x %y]
     72    $c bind transfunc <ButtonRelease-1> \
     73        [itcl::code $this NewMarker %x %y normal]
    7374    eval configure $args
    7475}
     
    9899}
    99100
    100 itcl::body Rappture::TransferFunctionEditor::NewMarker { x y } {
     101itcl::body Rappture::TransferFunctionEditor::NewMarker { x y state } {
    101102    set name "tick[incr _nextId]"
    102103    set w [winfo width $_canvas]
     
    105106    set _ticks($name) [$_canvas create image 0 $h \
    106107                           -image $_normalIcon -anchor s \
    107                            -tags "tick $_name $this" -state hidden]
     108                           -tags "tick $_name $this" -state $state]
    108109    set _labels($name) [$_canvas create text 0 $h \
    109110                            -anchor n -fill white -font "Helvetica 8" \
    110                             -tags "$this $_name" -state hidden]
     111                            -tags "$this $_name" -state $state]
    111112    set _id2name($_ticks($name)) $name
    112113    $_canvas bind $_ticks($name) <Enter> [itcl::code $this EnterTick $name]
     
    141142itcl::body Rappture::TransferFunctionEditor::Deactivate { name } {
    142143    if  { $_activePress || $_activeMotion } {
    143         puts stderr "do nothing for Deactivate"
     144        #puts stderr "do nothing for Deactivate"
    144145    } else {
    145146        $_canvas itemconfigure $_labels($name) -state hidden
     
    304305itcl::body Rappture::TransferFunctionEditor::addMarkers { values } {
    305306    foreach value $values {
    306         set name [NewMarker 0 0]
     307        set name [NewMarker 0 0 hidden]
    307308        SetRelativeValue $name $value
    308309    }
Note: See TracChangeset for help on using the changeset viewer.