Changeset 6522 for trunk/gui/scripts


Ignore:
Timestamp:
Aug 31, 2016, 6:48:37 PM (8 years ago)
Author:
ldelgass
Message:

Can't change visibility or opacity of mask layer

File:
1 edited

Legend:

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

    r6521 r6522  
    32853285                set ctlname "[regsub -all {\-} ${ctlname} {_}]"
    32863286            }
     3287
     3288            set tooltip [list $info(description)]
     3289            if { [info exists info(attribution)] &&
     3290                 $info(attribution) != ""} {
     3291                lappend tooltip $info(attribution)
     3292            }
     3293
    32873294            button $f.${ctlname}_zoom \
    32883295                -borderwidth 1 -padx 1 -pady 1 \
     
    32903297                -image [Rappture::icon zoom-extent] \
    32913298                -command [itcl::code $this camera zoom layer $dataobj $layer 1.0]
     3299            blt::table $f $row,0 $f.${ctlname}_zoom -anchor w -pady 2
    32923300            Rappture::Tooltip::for $f.${ctlname}_zoom \
    32933301                "Zoom to extent for $info(label)"
    32943302
    3295             checkbutton $f.${ctlname}_visible \
    3296                 -text $info(label) \
    3297                 -font "Arial 9" -anchor w \
    3298                 -variable [itcl::scope _visibility($tag)] \
    3299                 -command [itcl::code $this \
     3303            if { $info(type) == "mask" } {
     3304                label $f.${ctlname}_lbl \
     3305                    -text $info(label) \
     3306                    -font "Arial 9" -anchor w
     3307                blt::table $f $row,1 $f.${ctlname}_lbl -anchor w -pady 2 -cspan 2
     3308                Rappture::Tooltip::for $f.${ctlname}_lbl [join $tooltip \n]
     3309            } else {
     3310                checkbutton $f.${ctlname}_visible \
     3311                    -text $info(label) \
     3312                    -font "Arial 9" -anchor w \
     3313                    -variable [itcl::scope _visibility($tag)] \
     3314                    -command [itcl::code $this \
    33003315                              SetLayerVisibility $dataobj $layer]
    3301             blt::table $f $row,0 $f.${ctlname}_zoom -anchor w -pady 2
    3302             blt::table $f $row,1 $f.${ctlname}_visible -anchor w -pady 2 -cspan 2
     3316                blt::table $f $row,1 $f.${ctlname}_visible -anchor w -pady 2 -cspan 2
     3317                Rappture::Tooltip::for $f.${ctlname}_visible [join $tooltip \n]
     3318            }
    33033319            incr row
    33043320            if { $info(type) == "image" } {
     
    33273343            }
    33283344            if { $info(type) != "elevation" &&
     3345                 $info(type) != "mask" &&
    33293346                ($info(type) != "image" || $imgIdx > 1) } {
    33303347                label $f.${ctlname}_opacity_l -text "Opacity" -font "Arial 9"
     
    33403357                incr row
    33413358            }
    3342             set tooltip [list $info(description)]
    3343             if { [info exists info(attribution)] &&
    3344                  $info(attribution) != ""} {
    3345                 lappend tooltip $info(attribution)
    3346             }
    3347             Rappture::Tooltip::for $f.${ctlname}_visible [join $tooltip \n]
    33483359        }
    33493360        set mapAttrib [$dataobj hints "attribution"]
Note: See TracChangeset for help on using the changeset viewer.