- redraw_on_top_on_project_click works only for left mouse clicks on the Project objects list

This commit is contained in:
Marius Stanciu
2022-02-11 12:00:20 +02:00
committed by Marius
parent 529148c60d
commit 2de9bc730b
2 changed files with 8 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ CHANGELOG for FlatCAM beta
- plotting visuals in 3d graphic mode will no longer create some unnecessary lists
- made sure that the `redraw_on_top_on_project_click` works properly and only on mouse click release in the Project list
- made sure that the `redraw_on_top_on_project_click` works only on single object selections
- `redraw_on_top_on_project_click` works only for left mouse clicks on the Project objects list
10.02.2022

View File

@@ -72,7 +72,7 @@ class EventSensitiveListView(QtWidgets.QTreeView):
# self.dropped_obj = None
keyPressed = QtCore.pyqtSignal(int)
mouseReleased = QtCore.pyqtSignal(int)
mouseReleased = QtCore.pyqtSignal(object)
def keyPressEvent(self, event):
# super(EventSensitiveListView, self).keyPressEvent(event)
@@ -1010,10 +1010,12 @@ class ObjectCollection(QtCore.QAbstractItemModel):
if len(self.get_selected()) == 1:
self.app.proj_selection_changed.emit(current, previous)
def on_list_click_release(self):
# on Gerber object selection it will redrawn on top of the other Gerber objects
if self.app.defaults["gerber_plot_on_select"] is True:
self.app.gerber_redraw()
def on_list_click_release(self, button):
# works only for mouse button 1 (left click)
if button == Qt.MouseButton.LeftButton:
# on Gerber object selection it will redrawn on top of the other Gerber objects
if self.app.defaults["gerber_plot_on_select"] is True:
self.app.gerber_redraw()
def on_item_activated(self, index):
"""