Changeset 6486 for trunk/gui


Ignore:
Timestamp:
Aug 16, 2016 10:50:04 PM (8 years ago)
Author:
ldelgass
Message:

Fix error on _click not being defined

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/mapviewer.tcl

    r6452 r6486  
    18551855        }
    18561856        "drag" {
    1857             if {$_b1mode == "select"} {
    1858                 EventuallySelect $x $y
    1859             }
     1857            if {$_b1mode != "select"} {
     1858                return
     1859            }
     1860            if { ![info exists _click(x)] } {
     1861                set _click(x) $x
     1862            }
     1863            if { ![info exists _click(y)] } {
     1864                set _click(y) $y
     1865            }
     1866            EventuallySelect $x $y
    18601867        }
    18611868        "release" {
    18621869            set _b1mode ""
    1863             if {$_click(x) == $x &&
    1864                 $_click(y) == $y} {
     1870            if {![info exists _click(x)] ||
     1871                ![info exists _click(y)] ||
     1872                ($_click(x) == $x &&
     1873                 $_click(y) == $y)} {
    18651874                SendCmd "map box clear"
    18661875            } else {
Note: See TracChangeset for help on using the changeset viewer.