Changeset 3035 for trunk


Ignore:
Timestamp:
Jun 12, 2012 6:48:13 PM (12 years ago)
Author:
mmc
Message:

Fix for #258880, drag&drop movement wasn't working in the builder when
the list of elements was large and scrolled down. The screen (x,y)
coordinate wasn't being converted to canvas coordinates, so the drag&drop
"start" operation wasn't picking the right element.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/builder/scripts/hierlist.tcl

    r2081 r3035  
    371371# ----------------------------------------------------------------------
    372372itcl::body Rappture::Hierlist::dd_get_source {widget x y} {
     373    # convert from screen coords to canvas coords (for scrollbars)
     374    set x [$widget canvasx $x]
     375    set y [$widget canvasy $y]
     376
    373377    set data ""
    374     foreach id [$itk_component(area) find overlapping $x $y $x $y] {
    375         foreach tag [$itk_component(area) gettags $id] {
     378    foreach id [$widget find overlapping $x $y $x $y] {
     379        foreach tag [$widget gettags $id] {
    376380            # search for a tag like item:NNN and make sure it's selected
    377381            if {[regexp {^item:([0-9]+)$} $tag match node]
Note: See TracChangeset for help on using the changeset viewer.