Fix sketcher mode handling to prevent unintended line creation during drag operations
Major changes: - Fixed right-click handler to directly set mode to NONE instead of relying on main app signal handling - Added safety checks in left-click handler to prevent drawing when no draggable point is found in NONE mode - Enhanced mode compatibility by treating Python None as SketchMode.NONE in set_mode() method - Added comprehensive debug logging for mode changes and interaction state tracking - Resolved integration issue where persistent constraint modes were prematurely reset by main app - Ensured point dragging is only enabled in NONE mode, preventing accidental polyline creation This fixes the reported issue where deactivating the line tool would still create lines when dragging, and ensures proper mode transitions between drawing tools and selection/drag mode.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Created with matplotlib (http://matplotlib.org/) -->
|
||||
<svg height="72pt" version="1.1" viewBox="0 0 72 72" width="72pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<defs>
|
||||
<style type="text/css">
|
||||
*{stroke-linecap:butt;stroke-linejoin:round;}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="figure_1">
|
||||
<g id="patch_1">
|
||||
<path d="M 0 72
|
||||
L 72 72
|
||||
L 72 0
|
||||
L 0 0
|
||||
z
|
||||
" style="fill:none;opacity:0;"/>
|
||||
</g>
|
||||
<g id="text_1">
|
||||
<path d="M 62.71125 37.44
|
||||
C 62.71125 36.14375 62.2225 34.900625 61.30875 34.01875
|
||||
L 36.605625 9.315625
|
||||
C 35.691875 8.4125 34.438125 7.88125 33.1525 7.88125
|
||||
C 31.866875 7.88125 30.645 8.4125 29.741875 9.315625
|
||||
L 26.894375 12.163125
|
||||
C 25.980625 13.034375 25.449375 14.288125 25.449375 15.584375
|
||||
C 25.449375 16.87 25.980625 18.12375 26.894375 18.995
|
||||
L 38.008125 30.15125
|
||||
L 11.296875 30.15125
|
||||
C 8.56625 30.15125 6.855625 32.425 6.855625 35.006875
|
||||
L 6.855625 39.8625
|
||||
C 6.855625 42.444375 8.56625 44.72875 11.296875 44.72875
|
||||
L 38.008125 44.72875
|
||||
L 26.894375 55.8425
|
||||
C 25.980625 56.75625 25.449375 58.01 25.449375 59.295625
|
||||
C 25.449375 60.58125 25.980625 61.835 26.894375 62.74875
|
||||
L 29.741875 65.59625
|
||||
C 30.645 66.4675 31.866875 66.99875 33.1525 66.99875
|
||||
C 34.438125 66.99875 35.691875 66.4675 36.605625 65.59625
|
||||
L 61.30875 40.893125
|
||||
C 62.2225 39.979375 62.71125 38.725625 62.71125 37.44
|
||||
"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
Reference in New Issue
Block a user