Changeset 4684 for trunk/gui


Ignore:
Timestamp:
Nov 10, 2014, 3:46:47 AM (10 years ago)
Author:
ldelgass
Message:

Fix axes settings for glyph viewer, add fix (needs testing) for nanohub ticket
#270436

File:
1 edited

Legend:

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

    r4669 r4684  
    218218    array set _settings [subst {
    219219        -axesvisible            1
    220         -axislabelsvisible      1
     220        -axislabels             1
     221        -axisminorticks         1
    221222        -axismode               "static"
    222223        -background             black
     
    959960        set _first ""
    960961        InitSettings -xgrid -ygrid -zgrid -axismode \
    961             -axesvisible -axislabelsvisible
    962         foreach axis { x y z } {
    963             SendCmd "axis lformat $axis %g"
    964         }
     962            -axesvisible -axislabels -axisminorticks
     963        #SendCmd "axis lformat all %g"
    965964        StopBufferingCommands
    966965        SendCmd "imgflush"
     
    995994                    SendCmd "clientinfo [list $info]"
    996995                }
    997                 append _outbuf "dataset add $tag data follows $length\n"
     996                SendCmd "dataset add $tag data follows $length"
    998997                append _outbuf $bytes
    999998                set _datasets($tag) 1
     
    13261325            SendCmd "axis visible all $bool"
    13271326        }
    1328         "-axislabelsvisible" {
     1327        "-axislabels" {
    13291328            set bool $_settings($what)
    13301329            SendCmd "axis labels all $bool"
     1330        }
     1331        "-axisminorticks" {
     1332            set bool $_settings($what)
     1333            SendCmd "axis minticks all $bool"
    13311334        }
    13321335        "-xgrid" - "-ygrid" - "-zgrid" {
     
    13471350        "-cutplanevisible" {
    13481351            set bool $_settings($what)
    1349             SendCmd "cutplane visible $bool"
     1352            SendCmd "cutplane visible 0"
     1353            if { $bool } {
     1354                foreach tag [CurrentDatasets -visible] {
     1355                    SendCmd "cutplane visible $bool $tag"
     1356                }
     1357            }
    13501358        }
    13511359        "-cutplanewireframe" {
     
    14101418        "-glyphvisible" {
    14111419            set bool $_settings($what)
    1412             SendCmd "glyphs visible $bool"
     1420            SendCmd "glyphs visible 0"
     1421            if { $bool } {
     1422                foreach tag [CurrentDatasets -visible] {
     1423                    SendCmd "glyphs visible $bool $tag"
     1424                }
     1425            }
    14131426            if { $bool } {
    14141427                Rappture::Tooltip::for $itk_component(glyphs) \
     
    14301443        "-glyphoutline" {
    14311444            set bool $_settings($what)
    1432             SendCmd "outline visible $bool"
     1445            SendCmd "outline visible 0"
     1446            if { $bool } {
     1447                foreach tag [CurrentDatasets -visible] {
     1448                    SendCmd "outline visible $bool $tag"
     1449                }
     1450            }
    14331451        }
    14341452        "-glyphopacity" {
     
    17711789
    17721790    checkbutton $inner.visible \
    1773         -text "Show Axes" \
     1791        -text "Axes" \
    17741792        -variable [itcl::scope _settings(-axesvisible)] \
    17751793        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    17771795
    17781796    checkbutton $inner.labels \
    1779         -text "Show Axis Labels" \
    1780         -variable [itcl::scope _settings(-axislabelsvisible)] \
    1781         -command [itcl::code $this AdjustSetting -axislabelsvisible] \
     1797        -text "Axis Labels" \
     1798        -variable [itcl::scope _settings(-axislabels)] \
     1799        -command [itcl::code $this AdjustSetting -axislabels] \
    17821800        -font "Arial 9"
    1783 
    1784     checkbutton $inner.gridx \
    1785         -text "Show X Grid" \
     1801    label $inner.grid_l -text "Grid" -font "Arial 9"
     1802    checkbutton $inner.xgrid \
     1803        -text "X" \
    17861804        -variable [itcl::scope _settings(-xgrid)] \
    17871805        -command [itcl::code $this AdjustSetting -xgrid] \
    17881806        -font "Arial 9"
    1789     checkbutton $inner.gridy \
    1790         -text "Show Y Grid" \
     1807    checkbutton $inner.ygrid \
     1808        -text "Y" \
    17911809        -variable [itcl::scope _settings(-ygrid)] \
    17921810        -command [itcl::code $this AdjustSetting -ygrid] \
    17931811        -font "Arial 9"
    1794     checkbutton $inner.gridz \
    1795         -text "Show Z Grid" \
     1812    checkbutton $inner.zgrid \
     1813        -text "Z" \
    17961814        -variable [itcl::scope _settings(-zgrid)] \
    17971815        -command [itcl::code $this AdjustSetting -zgrid] \
     1816        -font "Arial 9"
     1817    checkbutton $inner.minorticks \
     1818        -text "Minor Ticks" \
     1819        -variable [itcl::scope _settings(-axisminorticks)] \
     1820        -command [itcl::code $this AdjustSetting -axisminorticks] \
    17981821        -font "Arial 9"
    17991822
     
    18121835
    18131836    blt::table $inner \
    1814         0,0 $inner.visible -anchor w -cspan 2 \
    1815         1,0 $inner.labels  -anchor w -cspan 2 \
    1816         2,0 $inner.gridx   -anchor w -cspan 2 \
    1817         3,0 $inner.gridy   -anchor w -cspan 2 \
    1818         4,0 $inner.gridz   -anchor w -cspan 2 \
    1819         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1820         6,0 $inner.mode    -fill x   -cspan 2
     1837        0,0 $inner.visible -anchor w -cspan 4 \
     1838        1,0 $inner.labels  -anchor w -cspan 4 \
     1839        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1840        4,0 $inner.grid_l  -anchor w \
     1841        4,1 $inner.xgrid   -anchor w \
     1842        4,2 $inner.ygrid   -anchor w \
     1843        4,3 $inner.zgrid   -anchor w \
     1844        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1845        5,1 $inner.mode    -fill x   -cspan 3
    18211846
    18221847    blt::table configure $inner r* c* -resize none
    1823     blt::table configure $inner r7 c1 -resize expand
     1848    blt::table configure $inner r7 c6 -resize expand
     1849    blt::table configure $inner r3 -height 0.125i
    18241850}
    18251851
Note: See TracChangeset for help on using the changeset viewer.