- fixed bug that inversed mouse cursor movement versus the real movement on Y axis when Grid lines are Off
This commit is contained in:
@@ -13,6 +13,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- removed the "follow" functionality from the Isolation Tool
|
- removed the "follow" functionality from the Isolation Tool
|
||||||
- created a new application Tool named Follow Tool
|
- created a new application Tool named Follow Tool
|
||||||
- added the "follow" functionality in the Follow Tool and added the new feature of allowing to perform "follow" on an area selection
|
- added the "follow" functionality in the Follow Tool and added the new feature of allowing to perform "follow" on an area selection
|
||||||
|
- fixed bug that inversed mouse cursor movement versus the real movement on Y axis when Grid lines are Off
|
||||||
|
|
||||||
11.11.2020
|
11.11.2020
|
||||||
|
|
||||||
|
|||||||
@@ -276,16 +276,29 @@ class PlotCanvas(QtCore.QObject, VisPyCanvas):
|
|||||||
def on_toggle_grid_lines(self, signal=None, silent=None):
|
def on_toggle_grid_lines(self, signal=None, silent=None):
|
||||||
state = not self.grid_lines_enabled
|
state = not self.grid_lines_enabled
|
||||||
|
|
||||||
|
settings = QtCore.QSettings("Open Source", "FlatCAM")
|
||||||
|
if settings.contains("theme"):
|
||||||
|
theme = settings.value('theme', type=str)
|
||||||
|
else:
|
||||||
|
theme = 'white'
|
||||||
|
|
||||||
|
if theme == 'white':
|
||||||
|
color = 'dimgray'
|
||||||
|
else:
|
||||||
|
color = '#dededeff'
|
||||||
|
|
||||||
if state:
|
if state:
|
||||||
self.fcapp.defaults['global_grid_lines'] = True
|
self.fcapp.defaults['global_grid_lines'] = True
|
||||||
self.grid_lines_enabled = True
|
self.grid_lines_enabled = True
|
||||||
self.grid.parent = self.view.scene
|
# self.grid.parent = self.view.scene
|
||||||
|
self.grid._grid_color_fn['color'] = Color(color).rgba
|
||||||
if silent is None:
|
if silent is None:
|
||||||
self.fcapp.inform[str, bool].emit(_("Grid enabled."), False)
|
self.fcapp.inform[str, bool].emit(_("Grid enabled."), False)
|
||||||
else:
|
else:
|
||||||
self.fcapp.defaults['global_grid_lines'] = False
|
self.fcapp.defaults['global_grid_lines'] = False
|
||||||
self.grid_lines_enabled = False
|
self.grid_lines_enabled = False
|
||||||
self.grid.parent = None
|
# self.grid.parent = None
|
||||||
|
self.grid._grid_color_fn['color'] = Color('#FFFFFFFF').rgba
|
||||||
if silent is None:
|
if silent is None:
|
||||||
self.fcapp.inform[str, bool].emit(_("Grid disabled."), False)
|
self.fcapp.inform[str, bool].emit(_("Grid disabled."), False)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user