Changeset 5017 for branches/1.3
- Timestamp:
- Feb 13, 2015, 1:21:21 AM (10 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/branches/uiuc_vtk_viewers reverse-merged: 4952,4954,4991-4992 /trunk reverse-merged: 4993
- Property svn:mergeinfo changed
-
branches/1.3/gui/scripts/vtkisosurfaceviewer.tcl
r4994 r5017 70 70 private method BuildDownloadPopup { widget command } 71 71 private method BuildIsosurfaceTab {} 72 private method Combo { option } 72 73 private method Connect {} 73 74 private method CurrentDatasets {args} 74 private method DisableMouseRotationBindings {}75 75 private method Disconnect {} 76 76 private method DoChangeContourLevels {} … … 90 90 private method IsValidObject { dataobj } 91 91 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 }97 92 private method MotionLegend { x y } 98 93 private method Pan {option x y} … … 113 108 private method SetObjectStyle { dataobj comp } 114 109 private method SetOrientation { side } 115 private method SetupMouseRotationBindings {}116 private method SetupMousePanningBindings {}117 private method SetupKeyboardBindings {}118 110 private method Slice {option args} 119 111 private method ViewToQuaternion {} { … … 170 162 private variable _curFldName "" 171 163 private variable _curFldLabel "" 172 173 private variable _mouseOver ""; # what called LegendRangeAction, vmin or vmax174 164 } 175 165 … … 257 247 -colormap BCGYR 258 248 -colormapvisible 1 259 -customrange 0260 -customrangevmin 0261 -customrangevmax 1262 249 -cutplaneedges 0 263 250 -cutplanelighting 1 … … 312 299 ignore -background -foreground -relief -tearoff 313 300 } 314 315 # add an editor for adjusting the legend min and max values316 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 323 301 set c $itk_component(view) 324 302 bind $c <Configure> [itcl::code $this EventuallyResize %w %h] … … 431 409 blt::table configure $itk_component(plotarea) c1 -resize none 432 410 433 SetupMouseRotationBindings434 SetupMousePanningBindings435 SetupKeyboardBindings436 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 mouse444 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 $args451 452 EnableWaitDialog 500453 Connect454 # FIXME: Removing this update breaks wizard mode (see examples/3D)455 # However, it also allows an error in the initialization order456 # where FieldResult::add is called from ResultViewer before this457 # constructor is completed.458 #update459 }460 461 # ----------------------------------------------------------------------462 # DESTRUCTOR463 # ----------------------------------------------------------------------464 itcl::body Rappture::VtkIsosurfaceViewer::destructor {} {465 Disconnect466 image delete $_image(plot)467 image delete $_image(download)468 catch { blt::arcball destroy $_arcball }469 }470 471 itcl::body Rappture::VtkIsosurfaceViewer::SetupMouseRotationBindings {} {472 411 # Bindings for rotation via mouse 473 412 bind $itk_component(view) <ButtonPress-1> \ … … 477 416 bind $itk_component(view) <ButtonRelease-1> \ 478 417 [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 489 419 # Bindings for panning via mouse 490 420 bind $itk_component(view) <ButtonPress-2> \ … … 494 424 bind $itk_component(view) <ButtonRelease-2> \ 495 425 [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 499 430 # Bindings for panning via keyboard 500 431 bind $itk_component(view) <KeyPress-Left> \ … … 522 453 523 454 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 # ---------------------------------------------------------------------- 473 itcl::body Rappture::VtkIsosurfaceViewer::destructor {} { 474 Disconnect 475 image delete $_image(plot) 476 image delete $_image(download) 477 catch { blt::arcball destroy $_arcball } 524 478 } 525 479 … … 771 725 if { ![info exists _limits($fname)] } { 772 726 set _limits($fname) $lim 773 774 # set reasonable defaults for775 # customrangevmin and customrangevmax776 foreach {min max} $lim break777 if { ![info exists _settings(-customrangevmin)] } {778 set _settings(-customrangevmin) $min779 }780 if { ![info exists _settings(-customrangevmax)] } {781 set _settings(-customrangevmax) $max782 }783 784 727 continue 785 728 } 786 729 foreach {min max} $lim break 787 730 foreach {fmin fmax} $_limits($fname) break 788 # if { $fname == $_curFldName && ! $_settings(-customrange) } {}789 if { ! $_settings(-customrange) } {790 set _settings(-customrangevmin) $fmin791 set _settings(-customrangevmax) $fmax792 }793 731 if { $fmin > $min } { 794 732 set fmin $min … … 1491 1429 SendCmd "dataset maprange all" 1492 1430 } 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" 1503 1432 } 1504 1433 SendCmd "cutplane colormode $_colorMode $_curFldName" … … 1574 1503 } 1575 1504 } 1576 }1577 "-range" {1578 foreach { vmin vmax } $_limits($_curFldName) break1579 if { $_settings(-customrange) } {1580 $itk_component(l_min) configure -state normal1581 $itk_component(min) configure -state normal1582 $itk_component(l_max) configure -state normal1583 $itk_component(max) configure -state normal1584 # foreach { vmin vmax } $_limits($_curFldName) break1585 # if { $_settings(-customrangevmin) < $vmin } {1586 # set _settings(-customrangevmin) $vmin1587 # }1588 # if { $_settings(-customrangevmin) > $vmax } {1589 # set _settings(-customrangevmin) $vmax1590 # }1591 # if { $_settings(-customrangevmax) < $vmin } {1592 # set _settings(-customrangevmax) $vmin1593 # }1594 # if { $_settings(-customrangevmax) > $vmax } {1595 # set _settings(-customrangevmax) $vmax1596 # }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 disabled1606 $itk_component(min) configure -state disabled1607 $itk_component(l_max) configure -state disabled1608 $itk_component(max) configure -state disabled1609 }1610 GenerateContourList1611 SendCmd [list contour3d contourlist $_contourList(values)]1612 SendCmd "dataset maprange explicit $vmin $vmax $_curFldName"1613 DrawLegend1614 1505 } 1615 1506 "-xcutplanevisible" - "-ycutplanevisible" - "-zcutplanevisible" { … … 1684 1575 incr h -$lineht 1685 1576 } 1686 # Set the legend on the first isosurfacedataset.1577 # Set the legend on the first heightmap dataset. 1687 1578 if { $_currentColormap != "" } { 1688 1579 set cmap $_currentColormap … … 1829 1720 bind $itk_component(numcontours) <<Value>> \ 1830 1721 [itcl::code $this AdjustSetting -numcontours] 1831 1832 1833 # add widgets for setting a custom range on the legend1834 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 -background1851 }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 -background1865 }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 disabled1872 $itk_component(max) configure -state disabled1873 1874 1722 1875 1723 blt::table $inner \ … … 1891 1739 10,0 $inner.opacity_l -anchor w -pady 2 \ 1892 1740 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 \1898 1741 1899 1742 blt::table configure $inner r* c* -resize none 1900 blt::table configure $inner r1 4c1 -resize expand1743 blt::table configure $inner r11 c1 -resize expand 1901 1744 } 1902 1745 … … 2419 2262 } 2420 2263 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 the2428 # visualization server to show a specific isosurface.2429 # ----------------------------------------------------------------------2430 itcl::body Rappture::VtkIsosurfaceViewer::LegendB1Motion { status x y } {2431 2432 switch -- $status {2433 "press" {2434 DisableMouseRotationBindings2435 LegendProbeSingleContour $x $y2436 }2437 "motion" {2438 DisableMouseRotationBindings2439 LegendProbeSingleContour $x $y2440 }2441 "release" {2442 AdjustSetting -range2443 SetupMouseRotationBindings2444 }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 $_curFldName2460 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 point2468 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) break2474 }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.02479 }2480 return $value2481 }2482 2483 2484 # ----------------------------------------------------------------------2485 # USAGE: LegendProbeSingleContour <x> <y>2486 #2487 # Calculate the isosurface value for the x,y point and send a commands2488 # 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 2497 2264 # 2498 2265 # SetLegendTip -- … … 2539 2306 2540 2307 # 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 } 2544 2315 set tx [expr $x + 15] 2545 2316 set ty [expr $y - 5] 2546 2547 # Setup the text for the tooltip2548 2317 if { [info exists _isolines($y)] } { 2549 2318 Rappture::Tooltip::text $c [format "$title %g (isosurface)" $_isolines($y)] … … 2551 2320 Rappture::Tooltip::text $c [format "$title %g" $value] 2552 2321 } 2553 2554 # Show the tooltip2555 2322 Rappture::Tooltip::tooltip show $c +$tx,+$ty 2556 2323 } … … 2594 2361 # 2595 2362 itcl::body Rappture::VtkIsosurfaceViewer::ReceiveLegend { colormap title min max size } { 2596 # 2363 #puts stderr "ReceiveLegend colormap=$colormap title=$title range=$min,$max size=$size" 2597 2364 set _title $title 2598 2365 regsub {\(mag\)} $title "" _title … … 2614 2381 # DrawLegend -- 2615 2382 # 2616 # Draws the legend on thecanvas on the right side of the plot area.2383 # Draws the legend in the own canvas on the right side of the plot area. 2617 2384 # 2618 2385 itcl::body Rappture::VtkIsosurfaceViewer::DrawLegend {} { … … 2668 2435 $c bind sensor <Leave> [itcl::code $this LeaveLegend] 2669 2436 $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 2674 2437 } 2675 2438 $c delete isoline … … 2684 2447 $_settings(-numcontours) > 0 } { 2685 2448 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 2692 2450 set range [expr double($vmax - $vmin)] 2693 2451 if { $range <= 0.0 } { … … 2710 2468 } 2711 2469 2712 $c bind title <ButtonPress> [itcl::code $this LegendTitleActionpost]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] 2715 2473 # Reset the item coordinates according the current size of the plot. 2716 2474 $c itemconfigure title -text $title 2717 2475 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 2724 2477 $c itemconfigure vmin -text [format %g $vmin] 2725 2478 $c itemconfigure vmax -text [format %g $vmax] … … 2739 2492 $c raise sensor 2740 2493 $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 # ---------------------------------------------------------------------- 2507 itcl::body Rappture::VtkIsosurfaceViewer::Combo {option} { 2766 2508 set c $itk_component(view) 2767 2509 switch -- $option { … … 2775 2517 tk_popup $itk_component(fieldmenu) $x $y 2776 2518 } 2777 enter{2519 activate { 2778 2520 $c itemconfigure title -fill red 2779 2521 } 2780 leave {2522 deactivate { 2781 2523 $c itemconfigure title -fill $itk_option(-plotforeground) 2782 2524 } 2783 save {2525 invoke { 2784 2526 $itk_component(field) value $_curFldLabel 2785 2527 AdjustSetting -field 2786 2528 } 2787 2529 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" 2857 2531 } 2858 2532 } … … 2921 2595 set values $_contourList(reqValues) 2922 2596 } else { 2923 # use the field limits to calculate the contour list values2924 2597 foreach { vmin vmax } $_limits($_curFldName) break 2925 2926 # if custom range has been set and are within the field's2927 # range, use the custom min and max to generate contour list values2928 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 2937 2598 set v [blt::vector create \#auto] 2938 2599 $v seq $vmin $vmax [expr $_contourList(numLevels)+2] … … 2964 2625 -activeforeground $itk_option(-plotforeground) \ 2965 2626 -font "Arial 8" \ 2966 -command [itcl::code $this LegendTitleAction save]2627 -command [itcl::code $this Combo invoke] 2967 2628 set _fields($fname) [list $label $units $components] 2968 2629 if { $_curFldName == "" } {
Note: See TracChangeset
for help on using the changeset viewer.