Changeset 630
- Timestamp:
- Dec 4, 2009 5:09:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/excledt.tcl
- Property rcs:date changed from 2001/12/16 18:06:53 to 2002/07/18 20:50:04
- Property rcs:lines changed from +7 -4 to +25 -15
- Property rcs:rev changed from 1.7 to 1.8
r492 r630 684 684 proc exclEditMode {b bb} { 685 685 global zoom graph 686 # get binding687 set bindtag $graph(plot)688 catch {689 if {[bind bltZoomGraph] != ""} {690 set bindtag bltZoomGraph691 }692 }693 686 # save the zoom and unzoom commands 694 687 if [catch {set zoom(in)}] { 695 set zoom(in) [bind $bindtag <1>] 696 set zoom(out) [bind $bindtag <3>] 697 } 688 # get binding 689 set zoom(bindtag) $graph(plot) 690 catch { 691 if {[bind bltZoomGraph] != ""} { 692 set zoom(bindtag) bltZoomGraph 693 } 694 } 695 set zoom(in) [bind $zoom(bindtag) <1>] 696 set zoom(out) [bind $zoom(bindtag) <3>] 697 # check for really new BLT where binding is handled differently 698 if {$zoom(in) == ""} { 699 foreach zoom(bindtag) [bindtags $graph(plot)] { 700 set zoom(in) [bind $zoom(bindtag) <1>] 701 set zoom(out) [bind $zoom(bindtag) <3>] 702 if {$zoom(in) != ""} break 703 } 704 } 705 } 706 698 707 foreach c {1 2 3} { 699 708 if {$c == $b} { … … 707 716 if {[string trim [bind $graph(plot) <Motion>]] != ""} { 708 717 if {[lindex [bind $graph(plot) <Motion>] 0] == "exclMove"} { 709 exclReset $ bindtag718 exclReset $zoom(bindtag) 710 719 } else { 711 720 blt::ResetZoom $graph(plot) … … 713 722 } 714 723 if {$b == 2} { 715 bind $ bindtag <1> "exclAdd $bindtag%x %y"724 bind $zoom(bindtag) <1> "exclAdd $zoom(bindtag) %x %y" 716 725 $graph(plot) config -cursor arrow 717 726 } elseif {$b == 3} { 718 bind $ bindtag <1> "exclDel $bindtag%x %y"727 bind $zoom(bindtag) <1> "exclDel $zoom(bindtag) %x %y" 719 728 $graph(plot) config -cursor circle 720 729 } else { 721 bind $ bindtag<1> $zoom(in)722 bind $ bindtag<3> $zoom(out)730 bind $zoom(bindtag) <1> $zoom(in) 731 bind $zoom(bindtag) <3> $zoom(out) 723 732 $graph(plot) config -cursor crosshair 724 733 } … … 1741 1750 bind all <Control-KeyPress-c> {CheckChanges;destroy $graph(exclbox)} 1742 1751 putontop $graph(exclbox) 1752 wm deiconify $graph(exclbox) 1743 1753 tkwait window $graph(exclbox) 1744 1754 afterputontop
Note: See TracChangeset
for help on using the changeset viewer.