Changeset 3030 for trunk/tester/scripts


Ignore:
Timestamp:
Jun 11, 2012 7:49:48 PM (8 years ago)
Author:
mmc
Message:

Fix for #262267, problem with side-by-side scrolling in the Rappture
tester. Scrolling one side with the scroll wheel should scroll the
other side too. Fixed.

Fix for #262266, scrolling in the failed results area doesn't work
correctly. When the list of differences for a test is scrolled up,
you should be able to highlight elements and select them properly.

Fixed bgerrors related to the new ResultSet? when you hit "X" to close
a Rappture application.

Location:
trunk/tester/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tester/scripts/statuslist.tcl

    r2139 r3030  
    289289    set c $itk_component(listview)
    290290
     291    # translate the screen y to the canvas y (may be scrolled down)
     292    set y [$c canvasy $y]
     293
    291294    set index ""
    292295    foreach id [$c find overlapping 10 $y 10 $y] {
  • trunk/tester/scripts/stringdiffs.tcl

    r2139 r3030  
    3232
    3333    protected method _yview {args}
     34    protected method _ysbar {args}
    3435}
    3536
     
    128129    $itk_component(body1) configure \
    129130        -xscrollcommand [list $itk_component(xsbar1) set] \
    130         -yscrollcommand [list $itk_component(ysbar) set]
     131        -yscrollcommand [itcl::code $this _ysbar body1]
    131132    $itk_component(body2) configure \
    132         -xscrollcommand [list $itk_component(xsbar2) set]
     133        -xscrollcommand [list $itk_component(xsbar2) set] \
     134        -yscrollcommand [itcl::code $this _ysbar body2]
    133135
    134136    grid $itk_component(title1) -row 0 -column 0 -sticky nsew
     
    205207# USAGE: _yview <arg> <arg>...
    206208#
    207 # Loads two values into the viewer and shows their differences.
    208 # If the strings are short, the diffs are shown inline.  Otherwise,
    209 # they are show with side-by-side viewers.
     209# Called whenever the scrollbar changes the y-view of the diffs.
     210# Sends the new command along to both views so they are aligned.
    210211# ----------------------------------------------------------------------
    211212itcl::body Rappture::Tester::StringDiffs::_yview {args} {
    212213    eval $itk_component(body1) yview $args
    213214    eval $itk_component(body2) yview $args
     215}
     216
     217# ----------------------------------------------------------------------
     218# USAGE: _ysbar <whichChanged> <arg> <arg>...
     219#
     220# Called whenever the y-view of one widget changes.  Copies the
     221# current view from the <whichChanged> widget to the other side,
     222# and updates the bubble to display the correct view.
     223# ----------------------------------------------------------------------
     224itcl::body Rappture::Tester::StringDiffs::_ysbar {which args} {
     225    switch -- $which {
     226        body1 {
     227            set pos [lindex [$itk_component(body1) yview] 0]
     228            $itk_component(body2) yview moveto $pos
     229        }
     230        body2 {
     231            set pos [lindex [$itk_component(body2) yview] 0]
     232            $itk_component(body1) yview moveto $pos
     233        }
     234    }
     235    eval $itk_component(ysbar) set $args
    214236}
    215237
Note: See TracChangeset for help on using the changeset viewer.