change cursor for drawing modes
This commit is contained in:
parent
cd1deb3c8b
commit
895fa54ed7
@ -20,6 +20,10 @@ class SketchWidget:
|
||||
self.drawingConstraints = []
|
||||
self.mode = ''
|
||||
self.snap_points = {} # keyed by (shape, ptNum)
|
||||
self.cursors = {
|
||||
'arrow': gtk.gdk.Cursor(gtk.gdk.ARROW),
|
||||
'crosshair': gtk.gdk.Cursor(gtk.gdk.CROSSHAIR),
|
||||
}
|
||||
|
||||
# Configuration parameters
|
||||
self.line_width = 1.5
|
||||
@ -357,6 +361,11 @@ class SketchWidget:
|
||||
elif self.mode == 'circle':
|
||||
self.drawingShape = None
|
||||
self.queue_redraw()
|
||||
if self.widget.window is not None:
|
||||
if mode in ('line', 'circle'):
|
||||
self.widget.window.set_cursor(self.cursors['crosshair'])
|
||||
else:
|
||||
self.widget.window.set_cursor(self.cursors['arrow'])
|
||||
self.mode = mode
|
||||
|
||||
def do_line_left_click(self, x, y):
|
||||
|
Loading…
x
Reference in New Issue
Block a user