Solves exception when hitting a key a no tool being active in FlatCAMDraw. Was also preventing scrolling. Solve #93.
This commit is contained in:
parent
2a21c426e3
commit
4cbeec5a84
|
@ -934,6 +934,8 @@ class FlatCAMDraw(QtCore.QObject):
|
|||
self.corner_snap_btn.trigger()
|
||||
|
||||
### Propagate to tool
|
||||
response = None
|
||||
if self.active_tool is not None:
|
||||
response = self.active_tool.on_key(event.key)
|
||||
if response is not None:
|
||||
self.app.info(response)
|
||||
|
|
|
@ -45,6 +45,9 @@ class PlotCanvas:
|
|||
|
||||
# The canvas is the top level container (Gtk.DrawingArea)
|
||||
self.canvas = FigureCanvas(self.figure)
|
||||
# self.canvas.setFocusPolicy(QtCore.Qt.ClickFocus)
|
||||
# self.canvas.setFocus()
|
||||
|
||||
#self.canvas.set_hexpand(1)
|
||||
#self.canvas.set_vexpand(1)
|
||||
#self.canvas.set_can_focus(True) # For key press
|
||||
|
|
Loading…
Reference in New Issue