Changeset 4428 for branches/1.3


Ignore:
Timestamp:
Jun 25, 2014, 11:29:50 AM (10 years ago)
Author:
gah
Message:

test for change in limits in isosurfaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/vtkisosurfaceviewer.tcl

    r4426 r4428  
    141141    private variable _isolines
    142142    private variable _contourList
    143 
     143    private variable _currentLimits ""
    144144    common _downloadPopup;              # download options from popup
    145145    private common _hardcopy
     
    577577    set _obj2ovride($dataobj-width) $params(-width)
    578578    set _obj2ovride($dataobj-raise) $params(-raise)
    579     EventuallyChangeContourLevels
    580579    $_dispatcher event -idle !rebuild
    581580}
     
    609608    # If anything changed, then rebuild the plot
    610609    if { $changed } {
    611         EventuallyChangeContourLevels
    612610        $_dispatcher event -idle !rebuild
    613611    }
     
    10691067        }
    10701068        $itk_component(field) value $_curFldLabel
     1069
     1070        if { ![info exists _limits($_curFldName)] } {
     1071            SendCmd "dataset maprange all"
     1072        } else {
     1073            set limits $_limits($_curFldName)
     1074            SendCmd "dataset maprange explicit $limits $_curFldName"
     1075            if { $limits != $_currentLimits } {
     1076                set _currentLimits $limits
     1077                EventuallyChangeContourLevels
     1078            }
     1079        }
    10711080    }
    10721081    InitSettings -cutplanesvisible -isosurfacevisible -isosurfaceoutline
     
    14531462        "-numcontours" {
    14541463            set _settings($what) [$itk_component(numcontours) value]
    1455             set _contourList(numLevels) $_settings($what)
    1456             EventuallyChangeContourLevels
     1464            if { $_contourList(numLevels) != $_settings($what) } {
     1465                set _contourList(numLevels) $_settings($what)
     1466                EventuallyChangeContourLevels
     1467            }
    14571468        }
    14581469        "-isosurfacewireframe" {
     
    15251536                puts stderr "dataset maprange all"
    15261537            } else {
    1527                 puts stderr "dataset maprange explicit $_limits($_curFldName) $_curFldName"         
    15281538                SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
    15291539            }
Note: See TracChangeset for help on using the changeset viewer.