Changeset 5017 for branches/1.3


Ignore:
Timestamp:
Feb 13, 2015, 1:21:21 AM (10 years ago)
Author:
dkearney
Message:

reversing the min/max range feature in branches/1.3, keeping spacing cleanup

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

  • branches/1.3/gui/scripts/vtkisosurfaceviewer.tcl

    r4994 r5017  
    7070    private method BuildDownloadPopup { widget command }
    7171    private method BuildIsosurfaceTab {}
     72    private method Combo { option }
    7273    private method Connect {}
    7374    private method CurrentDatasets {args}
    74     private method DisableMouseRotationBindings {}
    7575    private method Disconnect {}
    7676    private method DoChangeContourLevels {}
     
    9090    private method IsValidObject { dataobj }
    9191    private method LeaveLegend {}
    92     private method LegendB1Motion {status x y}
    93     private method LegendPointToValue { x y }
    94     private method LegendProbeSingleContour { x y }
    95     private method LegendRangeAction { option args }
    96     private method LegendTitleAction { option }
    9792    private method MotionLegend { x y }
    9893    private method Pan {option x y}
     
    113108    private method SetObjectStyle { dataobj comp }
    114109    private method SetOrientation { side }
    115     private method SetupMouseRotationBindings {}
    116     private method SetupMousePanningBindings {}
    117     private method SetupKeyboardBindings {}
    118110    private method Slice {option args}
    119111    private method ViewToQuaternion {} {
     
    170162    private variable _curFldName ""
    171163    private variable _curFldLabel ""
    172 
    173     private variable _mouseOver "";     # what called LegendRangeAction, vmin or vmax
    174164}
    175165
     
    257247        -colormap                   BCGYR
    258248        -colormapvisible            1
    259         -customrange                0
    260         -customrangevmin            0
    261         -customrangevmax            1
    262249        -cutplaneedges              0
    263250        -cutplanelighting           1
     
    312299        ignore -background -foreground -relief -tearoff
    313300    }
    314 
    315     # add an editor for adjusting the legend min and max values
    316     itk_component add editor {
    317         Rappture::Editor $itk_interior.editor \
    318             -activatecommand [itcl::code $this LegendRangeAction activate] \
    319             -validatecommand [itcl::code $this LegendRangeAction validate] \
    320             -applycommand [itcl::code $this LegendRangeAction apply]
    321     }
    322 
    323301    set c $itk_component(view)
    324302    bind $c <Configure> [itcl::code $this EventuallyResize %w %h]
     
    431409    blt::table configure $itk_component(plotarea) c1 -resize none
    432410
    433     SetupMouseRotationBindings
    434     SetupMousePanningBindings
    435     SetupKeyboardBindings
    436 
    437 
    438     #bind $itk_component(view) <ButtonRelease-3> \
    439     #    [itcl::code $this Pick %x %y]
    440 
    441 
    442     if {[string equal "x11" [tk windowingsystem]]} {
    443         # Bindings for zoom via mouse
    444         bind $itk_component(view) <4> [itcl::code $this Zoom out]
    445         bind $itk_component(view) <5> [itcl::code $this Zoom in]
    446     }
    447 
    448     set _image(download) [image create photo]
    449 
    450     eval itk_initialize $args
    451 
    452     EnableWaitDialog 500
    453     Connect
    454     # FIXME: Removing this update breaks wizard mode (see examples/3D)
    455     # However, it also allows an error in the initialization order
    456     # where FieldResult::add is called from ResultViewer before this
    457     # constructor is completed.
    458     #update
    459 }
    460 
    461 # ----------------------------------------------------------------------
    462 # DESTRUCTOR
    463 # ----------------------------------------------------------------------
    464 itcl::body Rappture::VtkIsosurfaceViewer::destructor {} {
    465     Disconnect
    466     image delete $_image(plot)
    467     image delete $_image(download)
    468     catch { blt::arcball destroy $_arcball }
    469 }
    470 
    471 itcl::body Rappture::VtkIsosurfaceViewer::SetupMouseRotationBindings {} {
    472411    # Bindings for rotation via mouse
    473412    bind $itk_component(view) <ButtonPress-1> \
     
    477416    bind $itk_component(view) <ButtonRelease-1> \
    478417        [itcl::code $this Rotate release %x %y]
    479 }
    480 
    481 itcl::body Rappture::VtkIsosurfaceViewer::DisableMouseRotationBindings {} {
    482     # Bindings for rotation via mouse
    483     bind $itk_component(view) <ButtonPress-1> ""
    484     bind $itk_component(view) <B1-Motion> ""
    485     bind $itk_component(view) <ButtonRelease-1> ""
    486 }
    487 
    488 itcl::body Rappture::VtkIsosurfaceViewer::SetupMousePanningBindings {} {
     418
    489419    # Bindings for panning via mouse
    490420    bind $itk_component(view) <ButtonPress-2> \
     
    494424    bind $itk_component(view) <ButtonRelease-2> \
    495425        [itcl::code $this Pan release %x %y]
    496 }
    497 
    498 itcl::body Rappture::VtkIsosurfaceViewer::SetupKeyboardBindings {} {
     426
     427    #bind $itk_component(view) <ButtonRelease-3> \
     428    #    [itcl::code $this Pick %x %y]
     429
    499430    # Bindings for panning via keyboard
    500431    bind $itk_component(view) <KeyPress-Left> \
     
    522453
    523454    bind $itk_component(view) <Enter> "focus $itk_component(view)"
     455
     456    if {[string equal "x11" [tk windowingsystem]]} {
     457        # Bindings for zoom via mouse
     458        bind $itk_component(view) <4> [itcl::code $this Zoom out]
     459        bind $itk_component(view) <5> [itcl::code $this Zoom in]
     460    }
     461
     462    set _image(download) [image create photo]
     463
     464    eval itk_initialize $args
     465
     466    EnableWaitDialog 500
     467    Connect
     468}
     469
     470# ----------------------------------------------------------------------
     471# DESTRUCTOR
     472# ----------------------------------------------------------------------
     473itcl::body Rappture::VtkIsosurfaceViewer::destructor {} {
     474    Disconnect
     475    image delete $_image(plot)
     476    image delete $_image(download)
     477    catch { blt::arcball destroy $_arcball }
    524478}
    525479
     
    771725            if { ![info exists _limits($fname)] } {
    772726                set _limits($fname) $lim
    773 
    774                 # set reasonable defaults for
    775                 # customrangevmin and customrangevmax
    776                 foreach {min max} $lim break
    777                 if { ![info exists _settings(-customrangevmin)] } {
    778                     set _settings(-customrangevmin) $min
    779                 }
    780                 if { ![info exists _settings(-customrangevmax)] } {
    781                     set _settings(-customrangevmax) $max
    782                 }
    783 
    784727                continue
    785728            }
    786729            foreach {min max} $lim break
    787730            foreach {fmin fmax} $_limits($fname) break
    788 #            if { $fname == $_curFldName && ! $_settings(-customrange) } {}
    789             if { ! $_settings(-customrange) } {
    790                 set _settings(-customrangevmin) $fmin
    791                 set _settings(-customrangevmax) $fmax
    792             }
    793731            if { $fmin > $min } {
    794732                set fmin $min
     
    14911429                SendCmd "dataset maprange all"
    14921430            } else {
    1493                 foreach { vmin vmax } $_limits($_curFldName) break
    1494                 if { $_settings(-customrange) } {
    1495                     if { $_settings(-customrangevmin) > $vmin } {
    1496                         set vmin $_settings(-customrangevmin)
    1497                     }
    1498                     if { $_settings(-customrangevmax) < $vmax } {
    1499                         set vmax $_settings(-customrangevmax)
    1500                     }
    1501                 }
    1502                 SendCmd "dataset maprange explicit $vmin $vmax $_curFldName"
     1431                SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
    15031432            }
    15041433            SendCmd "cutplane colormode $_colorMode $_curFldName"
     
    15741503                }
    15751504            }
    1576         }
    1577         "-range" {
    1578             foreach { vmin vmax } $_limits($_curFldName) break
    1579             if { $_settings(-customrange) } {
    1580                 $itk_component(l_min) configure -state normal
    1581                 $itk_component(min) configure -state normal
    1582                 $itk_component(l_max) configure -state normal
    1583                 $itk_component(max) configure -state normal
    1584 #                foreach { vmin vmax } $_limits($_curFldName) break
    1585 #                if { $_settings(-customrangevmin) < $vmin } {
    1586 #                    set _settings(-customrangevmin) $vmin
    1587 #                }
    1588 #                if { $_settings(-customrangevmin) > $vmax } {
    1589 #                    set _settings(-customrangevmin) $vmax
    1590 #                }
    1591 #                if { $_settings(-customrangevmax) < $vmin } {
    1592 #                    set _settings(-customrangevmax) $vmin
    1593 #                }
    1594 #                if { $_settings(-customrangevmax) > $vmax } {
    1595 #                    set _settings(-customrangevmax) $vmax
    1596 #                }
    1597 #
    1598                 if { $_settings(-customrangevmin) > $vmin } {
    1599                     set vmin $_settings(-customrangevmin)
    1600                 }
    1601                 if { $_settings(-customrangevmax) < $vmax } {
    1602                     set vmax $_settings(-customrangevmax)
    1603                 }
    1604             } else {
    1605                 $itk_component(l_min) configure -state disabled
    1606                 $itk_component(min) configure -state disabled
    1607                 $itk_component(l_max) configure -state disabled
    1608                 $itk_component(max) configure -state disabled
    1609             }
    1610             GenerateContourList
    1611             SendCmd [list contour3d contourlist $_contourList(values)]
    1612             SendCmd "dataset maprange explicit $vmin $vmax $_curFldName"
    1613             DrawLegend
    16141505        }
    16151506        "-xcutplanevisible" - "-ycutplanevisible" - "-zcutplanevisible" {
     
    16841575        incr h -$lineht
    16851576    }
    1686     # Set the legend on the first isosurface dataset.
     1577    # Set the legend on the first heightmap dataset.
    16871578    if { $_currentColormap != ""  } {
    16881579        set cmap $_currentColormap
     
    18291720    bind $itk_component(numcontours) <<Value>> \
    18301721        [itcl::code $this AdjustSetting -numcontours]
    1831 
    1832 
    1833     # add widgets for setting a custom range on the legend
    1834 
    1835     itk_component add crange {
    1836         checkbutton $inner.crange \
    1837             -text "Use Custom Range:" \
    1838             -variable [itcl::scope _settings(-customrange)] \
    1839             -command [itcl::code $this AdjustSetting -range] \
    1840             -font "Arial 9"
    1841     }
    1842 
    1843     itk_component add l_min {
    1844         label $inner.l_min -text "Min" -font "Arial 9"
    1845     }
    1846     itk_component add min {
    1847         entry $inner.min -font "Arial 9" -bg white \
    1848             -textvariable [itcl::scope _settings(-customrangevmin)]
    1849     } {
    1850         ignore -font -background
    1851     }
    1852     bind $inner.min <Return> \
    1853         [itcl::code $this AdjustSetting -range]
    1854     bind $inner.min <KP_Enter> \
    1855         [itcl::code $this AdjustSetting -range]
    1856 
    1857     itk_component add l_max {
    1858         label $inner.l_max -text "Max" -font "Arial 9"
    1859     }
    1860     itk_component add max {
    1861         entry $inner.max -font "Arial 9" -bg white \
    1862             -textvariable [itcl::scope _settings(-customrangevmax)]
    1863     } {
    1864         ignore -font -background
    1865     }
    1866     bind $inner.max <Return> \
    1867         [itcl::code $this AdjustSetting -range]
    1868     bind $inner.max <KP_Enter> \
    1869         [itcl::code $this AdjustSetting -range]
    1870 
    1871     $itk_component(min) configure -state disabled
    1872     $itk_component(max) configure -state disabled
    1873 
    18741722
    18751723    blt::table $inner \
     
    18911739        10,0 $inner.opacity_l -anchor w -pady 2 \
    18921740        10,1 $inner.opacity   -fill x   -pady 2 -fill x \
    1893         11,0 $inner.crange    -anchor w -pady 2 -cspan 2 \
    1894         12,0 $inner.l_min     -anchor w -pady 2 \
    1895         12,1 $inner.min       -anchor w -pady 2 -fill x \
    1896         13,0 $inner.l_max     -anchor w -pady 2 \
    1897         13,1 $inner.max       -anchor w -pady 2 -fill x \
    18981741
    18991742    blt::table configure $inner r* c* -resize none
    1900     blt::table configure $inner r14 c1 -resize expand
     1743    blt::table configure $inner r11 c1 -resize expand
    19011744}
    19021745
     
    24192262}
    24202263
    2421 # ----------------------------------------------------------------------
    2422 # USAGE: LegendB1Motion press <x> <y>
    2423 # USAGE: LegendB1Motion motion <x> <y>
    2424 # USAGE: LegendB1Motion release <x> <y>
    2425 #
    2426 # Manage actions for Button 1 presses that happen over the legend.
    2427 # Pressing mouse Button 1 on the legend sends a command to the
    2428 # visualization server to show a specific isosurface.
    2429 # ----------------------------------------------------------------------
    2430 itcl::body Rappture::VtkIsosurfaceViewer::LegendB1Motion { status x y } {
    2431 
    2432     switch -- $status {
    2433         "press" {
    2434             DisableMouseRotationBindings
    2435             LegendProbeSingleContour $x $y
    2436         }
    2437         "motion" {
    2438             DisableMouseRotationBindings
    2439             LegendProbeSingleContour $x $y
    2440         }
    2441         "release" {
    2442             AdjustSetting -range
    2443             SetupMouseRotationBindings
    2444         }
    2445         default {
    2446             error "bad option \"$option\": should be one of press, motion, release."
    2447         }
    2448     }
    2449 }
    2450 
    2451 
    2452 # ----------------------------------------------------------------------
    2453 # USAGE: LegendPointToValue <x> <y>
    2454 #
    2455 # Convert an x,y point on the legend to a numeric isosurface value.
    2456 # ----------------------------------------------------------------------
    2457 itcl::body Rappture::VtkIsosurfaceViewer::LegendPointToValue { x y } {
    2458 
    2459     set fname $_curFldName
    2460 
    2461     set font "Arial 8"
    2462     set lineht [font metrics $font -linespace]
    2463 
    2464     set ih [image height $_image(legend)]
    2465     set iy [expr $y - ($lineht + 2)]
    2466 
    2467     # Compute the value of the point
    2468     if { [info exists _limits($fname)] } {
    2469         if { $_settings(-customrange) } {
    2470             set vmin $_settings(-customrangevmin)
    2471             set vmax $_settings(-customrangevmax)
    2472         } else {
    2473             foreach { vmin vmax } $_limits($fname) break
    2474         }
    2475         set t [expr 1.0 - (double($iy) / double($ih-1))]
    2476         set value [expr $t * ($vmax - $vmin) + $vmin]
    2477     } else {
    2478         set value 0.0
    2479     }
    2480     return $value
    2481 }
    2482 
    2483 
    2484 # ----------------------------------------------------------------------
    2485 # USAGE: LegendProbeSingleContour <x> <y>
    2486 #
    2487 # Calculate the isosurface value for the x,y point and send a commands
    2488 # to the visualization server to show that isosurface.
    2489 # ----------------------------------------------------------------------
    2490 itcl::body Rappture::VtkIsosurfaceViewer::LegendProbeSingleContour { x y } {
    2491 
    2492     set value [LegendPointToValue $x $y]
    2493     SendCmd [list contour3d contourlist $value]
    2494 }
    2495 
    2496 
    24972264#
    24982265# SetLegendTip --
     
    25392306
    25402307    # Compute the value of the point
    2541     set value [LegendPointToValue $x $y]
    2542 
    2543     # Setup the location of the tooltip
     2308    if { [info exists _limits($_curFldName)] } {
     2309        foreach { vmin vmax } $_limits($_curFldName) break
     2310        set t [expr 1.0 - (double($iy) / double($ih-1))]
     2311        set value [expr $t * ($vmax - $vmin) + $vmin]
     2312    } else {
     2313        set value 0.0
     2314    }
    25442315    set tx [expr $x + 15]
    25452316    set ty [expr $y - 5]
    2546 
    2547     # Setup the text for the tooltip
    25482317    if { [info exists _isolines($y)] } {
    25492318        Rappture::Tooltip::text $c [format "$title %g (isosurface)" $_isolines($y)]
     
    25512320        Rappture::Tooltip::text $c [format "$title %g" $value]
    25522321    }
    2553 
    2554     # Show the tooltip
    25552322    Rappture::Tooltip::tooltip show $c +$tx,+$ty
    25562323}
     
    25942361#
    25952362itcl::body Rappture::VtkIsosurfaceViewer::ReceiveLegend { colormap title min max size } {
    2596     # puts stderr "ReceiveLegend colormap=$colormap title=$title range=$min,$max size=$size"
     2363    #puts stderr "ReceiveLegend colormap=$colormap title=$title range=$min,$max size=$size"
    25972364    set _title $title
    25982365    regsub {\(mag\)} $title "" _title
     
    26142381# DrawLegend --
    26152382#
    2616 #       Draws the legend on the canvas on the right side of the plot area.
     2383#       Draws the legend in the own canvas on the right side of the plot area.
    26172384#
    26182385itcl::body Rappture::VtkIsosurfaceViewer::DrawLegend {} {
     
    26682435        $c bind sensor <Leave> [itcl::code $this LeaveLegend]
    26692436        $c bind sensor <Motion> [itcl::code $this MotionLegend %x %y]
    2670         $c bind sensor <ButtonPress-1>   [itcl::code $this LegendB1Motion press %x %y]
    2671 #        $c bind sensor <B1-Motion>       [itcl::code $this LegendB1Motion motion %x %y]
    2672         $c bind sensor <ButtonRelease-1> [itcl::code $this LegendB1Motion release %x %y]
    2673 
    26742437    }
    26752438    $c delete isoline
     
    26842447         $_settings(-numcontours) > 0 } {
    26852448
    2686         if { $_settings(-customrange) } {
    2687             set vmin $_settings(-customrangevmin)
    2688             set vmax $_settings(-customrangevmax)
    2689         } else {
    2690             foreach { vmin vmax } $_limits($_curFldName) break
    2691         }
     2449        foreach { vmin vmax } $_limits($_curFldName) break
    26922450        set range [expr double($vmax - $vmin)]
    26932451        if { $range <= 0.0 } {
     
    27102468    }
    27112469
    2712     $c bind title <ButtonPress> [itcl::code $this LegendTitleAction post]
    2713     $c bind title <Enter> [itcl::code $this LegendTitleAction enter]
    2714     $c bind title <Leave> [itcl::code $this LegendTitleAction leave]
     2470    $c bind title <ButtonPress> [itcl::code $this Combo post]
     2471    $c bind title <Enter> [itcl::code $this Combo activate]
     2472    $c bind title <Leave> [itcl::code $this Combo deactivate]
    27152473    # Reset the item coordinates according the current size of the plot.
    27162474    $c itemconfigure title -text $title
    27172475    if { [info exists _limits($_curFldName)] } {
    2718         if { $_settings(-customrange) } {
    2719             set vmin $_settings(-customrangevmin)
    2720             set vmax $_settings(-customrangevmax)
    2721         } else {
    2722             foreach { vmin vmax } $_limits($_curFldName) break
    2723         }
     2476        foreach { vmin vmax } $_limits($_curFldName) break
    27242477        $c itemconfigure vmin -text [format %g $vmin]
    27252478        $c itemconfigure vmax -text [format %g $vmax]
     
    27392492    $c raise sensor
    27402493    $c coords vmin $x [expr {$h - 2}]
    2741 
    2742     $c bind vmin <ButtonPress> [itcl::code $this LegendRangeAction popup vmin]
    2743     $c bind vmin <Enter> [itcl::code $this LegendRangeAction enter vmin]
    2744     $c bind vmin <Leave> [itcl::code $this LegendRangeAction leave vmin]
    2745 
    2746     $c bind vmax <ButtonPress> [itcl::code $this LegendRangeAction popup vmax]
    2747     $c bind vmax <Enter> [itcl::code $this LegendRangeAction enter vmax]
    2748     $c bind vmax <Leave> [itcl::code $this LegendRangeAction leave vmax]
    2749 }
    2750 
    2751 # ----------------------------------------------------------------------
    2752 # USAGE: LegendTitleAction post
    2753 # USAGE: LegendTitleAction enter
    2754 # USAGE: LegendTitleAction leave
    2755 # USAGE: LegendTitleAction save
    2756 #
    2757 # Used internally to handle the dropdown list for the fields menu combobox.
    2758 # The post option is invoked when the field title is pressed to launch the
    2759 # dropdown. The enter option is invoked when the user mouses over the field
    2760 # title. The leave option is invoked when the user moves the mouse away
    2761 # from the field title.  The save option is invoked whenever there is a
    2762 # selection from the list, to alert the visualization server.
    2763 #
    2764 # ----------------------------------------------------------------------
    2765 itcl::body Rappture::VtkIsosurfaceViewer::LegendTitleAction {option} {
     2494}
     2495
     2496# ----------------------------------------------------------------------
     2497# USAGE: _dropdown post
     2498# USAGE: _dropdown unpost
     2499# USAGE: _dropdown select
     2500#
     2501# Used internally to handle the dropdown list for this combobox.  The
     2502# post/unpost options are invoked when the list is posted or unposted
     2503# to manage the relief of the controlling button.  The select option
     2504# is invoked whenever there is a selection from the list, to assign
     2505# the value back to the gauge.
     2506# ----------------------------------------------------------------------
     2507itcl::body Rappture::VtkIsosurfaceViewer::Combo {option} {
    27662508    set c $itk_component(view)
    27672509    switch -- $option {
     
    27752517            tk_popup $itk_component(fieldmenu) $x $y
    27762518        }
    2777         enter {
     2519        activate {
    27782520            $c itemconfigure title -fill red
    27792521        }
    2780         leave {
     2522        deactivate {
    27812523            $c itemconfigure title -fill $itk_option(-plotforeground)
    27822524        }
    2783         save {
     2525        invoke {
    27842526            $itk_component(field) value $_curFldLabel
    27852527            AdjustSetting -field
    27862528        }
    27872529        default {
    2788             error "bad option \"$option\": should be post, enter, leave, save"
    2789         }
    2790     }
    2791 }
    2792 
    2793 # ----------------------------------------------------------------------
    2794 # USAGE: LegendRangeAction enter <which>
    2795 # USAGE: LegendRangeAction leave <which>
    2796 #
    2797 # USAGE: LegendTitleAction popup <which>
    2798 # USAGE: LegendTitleAction activate
    2799 # USAGE: LegendTitleAction validate <value>
    2800 # USAGE: LegendTitleAction apply <value>
    2801 #
    2802 # Used internally to handle the mouseover and popup entry for the field range
    2803 # inputs.  The enter option is invoked when the user moves the mouse over the
    2804 # min or max field range. The leave option is invoked when the user moves the
    2805 # mouse away from the min or max field range. The popup option is invoked when
    2806 # the user click's on a field range. The popup option stores internally which
    2807 # widget is requesting a popup ( in the _mouseOver variable) and calls the
    2808 # activate command of the widget. The widget's activate command calls back to
    2809 # this method to get the xywh dimensions of the popup editor. After the user
    2810 # changes focus or sets the value in the editor, the editor calls this methods
    2811 # validate and apply options to set the value.
    2812 #
    2813 # ----------------------------------------------------------------------
    2814 itcl::body Rappture::VtkIsosurfaceViewer::LegendRangeAction {option args} {
    2815     set c $itk_component(view)
    2816 # FIXME: check $which for valid values
    2817     switch -- $option {
    2818         enter {
    2819             set which [lindex $args 0]
    2820             $c itemconfigure $which -fill red
    2821         }
    2822         leave {
    2823             set which [lindex $args 0]
    2824             $c itemconfigure $which -fill $itk_option(-plotforeground)
    2825         }
    2826         popup {
    2827             DisableMouseRotationBindings
    2828             set which [lindex $args 0]
    2829             set _mouseOver $which
    2830             $itk_component(editor) activate
    2831         }
    2832         activate {
    2833             foreach { x1 y1 x2 y2 } [$c bbox $_mouseOver] break
    2834             set info(text) $_settings(-customrange$_mouseOver)
    2835             set info(x) [expr $x1 + [winfo rootx $c]]
    2836             set info(y) [expr $y1 + [winfo rooty $c]]
    2837             set info(w) [expr $x2 - $x1]
    2838             set info(h) [expr $y2 - $y1]
    2839             return [array get info]
    2840         }
    2841         validate {
    2842             if {[llength $args] != 1} {
    2843                 error "wrong # args: should be \"editor validate value\""
    2844             }
    2845             SetupMouseRotationBindings
    2846         }
    2847         apply {
    2848             if {[llength $args] != 1} {
    2849                 error "wrong # args: should be \"editor apply value\""
    2850             }
    2851             set _settings(-customrange$_mouseOver) [lindex $args 0]
    2852             $itk_component(crange) select
    2853             AdjustSetting -range
    2854         }
    2855         default {
    2856             error "bad option \"$option\": should be enter, leave, activate, validate, apply"
     2530            error "bad option \"$option\": should be post, unpost, select"
    28572531        }
    28582532    }
     
    29212595        set values $_contourList(reqValues)
    29222596    } else {
    2923         # use the field limits to calculate the contour list values
    29242597        foreach { vmin vmax } $_limits($_curFldName) break
    2925 
    2926         # if custom range has been set and are within the field's
    2927         # range, use the custom min and max to generate contour list values
    2928         if { $_settings(-customrange) } {
    2929             if { $_settings(-customrangevmin) > $vmin } {
    2930                 set vmin $_settings(-customrangevmin)
    2931             }
    2932             if { $_settings(-customrangevmax) < $vmax } {
    2933                 set vmax $_settings(-customrangevmax)
    2934             }
    2935         }
    2936 
    29372598        set v [blt::vector create \#auto]
    29382599        $v seq $vmin $vmax [expr $_contourList(numLevels)+2]
     
    29642625                -activeforeground $itk_option(-plotforeground) \
    29652626                -font "Arial 8" \
    2966                 -command [itcl::code $this LegendTitleAction save]
     2627                -command [itcl::code $this Combo invoke]
    29672628            set _fields($fname) [list $label $units $components]
    29682629            if { $_curFldName == "" } {
Note: See TracChangeset for help on using the changeset viewer.