Changeset 3593 for trunk


Ignore:
Timestamp:
Mar 27, 2013 2:03:38 PM (11 years ago)
Author:
gah
Message:

fix: don't send commands to server in configuration routines if reset, let Rebuild do it

File:
1 edited

Legend:

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

    r3592 r3593  
    200200        xpan    0
    201201        ypan    0
    202         ortho   1
     202        ortho   0
    203203    }
    204204    set _arcball [blt::arcball create 100 100]
     
    902902    }
    903903    if { $_reset } {
    904         InitSettings isHeightmap background
    905904        #
    906905        # Reset the camera and other view parameters
    907906        #
    908         SendCmd "axis color all [Color2RGB $itk_option(-plotforeground)]"
     907        InitSettings isHeightmap background
    909908
    910909        # Let's see how this goes.  I think it's preferable to overloading the
     
    10441043        # Reset the camera and other view parameters
    10451044        #
    1046         SendCmd "axis color all [Color2RGB $itk_option(-plotforeground)]"
    1047         SendCmd "outline color [Color2RGB $itk_option(-plotforeground)]"
    10481045        ResetAxes
    10491046        set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
     
    13391336        }
    13401337        "background" {
    1341             set bgcolor [$itk_component(background) value]
     1338            set bg [$itk_component(background) value]
    13421339            array set fgcolors {
    13431340                "black" "white"
     
    13451342                "grey"  "black"
    13461343            }
    1347             configure -plotbackground $bgcolor \
    1348                 -plotforeground $fgcolors($bgcolor)
     1344            set fg $fgcolors($bg)
     1345            configure -plotbackground $bg -plotforeground $fg
    13491346            $itk_component(view) delete "legend"
     1347            SendCmd "screen bgcolor [Color2RGB $bg]"
     1348            SendCmd "outline color [Color2RGB $fg]"
     1349            SendCmd "axis color all [Color2RGB $fg]"
    13501350            DrawLegend
    13511351        }
     
    17611761        }
    17621762    }
    1763     AdjustSetting isHeightmap
     1763    if { !$_reset } {
     1764        AdjustSetting isHeightmap
     1765    }
    17641766}
    17651767
     
    17701772    if { [isconnected] } {
    17711773        set rgb [Color2RGB $itk_option(-plotbackground)]
    1772         SendCmd "screen bgcolor $rgb"
     1774        if { !$_reset } {
     1775            SendCmd "screen bgcolor $rgb"
     1776        }
    17731777        $itk_component(view) configure -background $itk_option(-plotbackground)
    17741778    }
     
    17811785    if { [isconnected] } {
    17821786        set rgb [Color2RGB $itk_option(-plotforeground)]
    1783         SendCmd "outline color $rgb"
    1784         SendCmd "axis color all $rgb"
     1787        if { !$_reset } {
     1788            SendCmd "outline color $rgb"
     1789            SendCmd "axis color all $rgb"
     1790        }
    17851791    }
    17861792}
Note: See TracChangeset for help on using the changeset viewer.