- changed the shortcut keys for Zoom In, Zoom Out and Zoom Fit from 1, 2, 3 to '-', '=' respectively 'V'. Added new shortcut keys '1', '2', '3' for Select Project Tab, Select Selected Tab and Select Tool Tab.
This commit is contained in:
@@ -494,9 +494,9 @@ class App(QtCore.QObject):
|
|||||||
"global_shell_shape": [500, 300], # Shape of the shell in pixels.
|
"global_shell_shape": [500, 300], # Shape of the shell in pixels.
|
||||||
"global_shell_at_startup": False, # Show the shell at startup.
|
"global_shell_at_startup": False, # Show the shell at startup.
|
||||||
"global_recent_limit": 10, # Max. items in recent list.
|
"global_recent_limit": 10, # Max. items in recent list.
|
||||||
"fit_key": '1',
|
"fit_key": 'V',
|
||||||
"zoom_out_key": '2',
|
"zoom_out_key": '-',
|
||||||
"zoom_in_key": '3',
|
"zoom_in_key": '=',
|
||||||
"grid_toggle_key": 'G',
|
"grid_toggle_key": 'G',
|
||||||
"zoom_ratio": 1.5,
|
"zoom_ratio": 1.5,
|
||||||
"global_point_clipboard_format": "(%.4f, %.4f)",
|
"global_point_clipboard_format": "(%.4f, %.4f)",
|
||||||
@@ -3914,8 +3914,6 @@ class App(QtCore.QObject):
|
|||||||
if index.internalPointer().parent_item != self.collection.root_item:
|
if index.internalPointer().parent_item != self.collection.root_item:
|
||||||
self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
|
self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def grid_status(self):
|
def grid_status(self):
|
||||||
if self.ui.grid_snap_btn.isChecked():
|
if self.ui.grid_snap_btn.isChecked():
|
||||||
return 1
|
return 1
|
||||||
@@ -4054,15 +4052,11 @@ class App(QtCore.QObject):
|
|||||||
webbrowser.open(self.video_url)
|
webbrowser.open(self.video_url)
|
||||||
return
|
return
|
||||||
|
|
||||||
if event.key == self.defaults['fit_key']: # 1
|
if event.key == self.defaults['zoom_out_key']: # '-'
|
||||||
self.on_zoom_fit(None)
|
|
||||||
return
|
|
||||||
|
|
||||||
if event.key == self.defaults['zoom_out_key']: # 2
|
|
||||||
self.plotcanvas.zoom(1 / self.defaults['zoom_ratio'], self.mouse)
|
self.plotcanvas.zoom(1 / self.defaults['zoom_ratio'], self.mouse)
|
||||||
return
|
return
|
||||||
|
|
||||||
if event.key == self.defaults['zoom_in_key']: # 3
|
if event.key == self.defaults['zoom_in_key']: # '='
|
||||||
self.plotcanvas.zoom(self.defaults['zoom_ratio'], self.mouse)
|
self.plotcanvas.zoom(self.defaults['zoom_ratio'], self.mouse)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -4075,6 +4069,15 @@ class App(QtCore.QObject):
|
|||||||
self.collection.get_active().ui.plot_cb.toggle()
|
self.collection.get_active().ui.plot_cb.toggle()
|
||||||
self.delete_selection_shape()
|
self.delete_selection_shape()
|
||||||
|
|
||||||
|
if event.key == '1':
|
||||||
|
self.on_select_tab('project')
|
||||||
|
|
||||||
|
if event.key == '2':
|
||||||
|
self.on_select_tab('selected')
|
||||||
|
|
||||||
|
if event.key == '3':
|
||||||
|
self.on_select_tab('tool')
|
||||||
|
|
||||||
if event.key == 'E':
|
if event.key == 'E':
|
||||||
self.object2editor()
|
self.object2editor()
|
||||||
|
|
||||||
@@ -4149,6 +4152,14 @@ class App(QtCore.QObject):
|
|||||||
self.ui.plot_tab_area.setCurrentWidget(self.ui.shortcuts_tab)
|
self.ui.plot_tab_area.setCurrentWidget(self.ui.shortcuts_tab)
|
||||||
self.ui.show()
|
self.ui.show()
|
||||||
|
|
||||||
|
def on_select_tab(self, name):
|
||||||
|
if name == 'project':
|
||||||
|
self.ui.notebook.setCurrentWidget(self.ui.project_tab)
|
||||||
|
elif name == 'selected':
|
||||||
|
self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
|
||||||
|
elif name == 'tool':
|
||||||
|
self.ui.notebook.setCurrentWidget(self.ui.tool_tab)
|
||||||
|
|
||||||
def on_copy_name(self):
|
def on_copy_name(self):
|
||||||
self.report_usage("on_copy_name()")
|
self.report_usage("on_copy_name()")
|
||||||
|
|
||||||
|
|||||||
@@ -756,9 +756,9 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
<br>
|
<br>
|
||||||
<b>~:</b> Show Shortcut List<br>
|
<b>~:</b> Show Shortcut List<br>
|
||||||
<br>
|
<br>
|
||||||
<b>1:</b> Zoom Fit<br>
|
<b>1:</b> Switch to Project Tab<br>
|
||||||
<b>2:</b> Zoom Out<br>
|
<b>2:</b> Switch to Selected Tab<br>
|
||||||
<b>3:</b> Zoom In<br>
|
<b>3:</b> Switch to Tool Tab<br>
|
||||||
<b>E:</b> Edit Object (if selected)<br>
|
<b>E:</b> Edit Object (if selected)<br>
|
||||||
<b>G:</b> Grid On/Off<br>
|
<b>G:</b> Grid On/Off<br>
|
||||||
<b>J:</b> Jump to Coordinates<br>
|
<b>J:</b> Jump to Coordinates<br>
|
||||||
@@ -770,9 +770,11 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
<b>P:</b> Open Properties Tool<br>
|
<b>P:</b> Open Properties Tool<br>
|
||||||
<b>R:</b> Rotate by 90 degree CW<br>
|
<b>R:</b> Rotate by 90 degree CW<br>
|
||||||
<b>S:</b> Shell Toggle<br>
|
<b>S:</b> Shell Toggle<br>
|
||||||
<b>V:</b> View Fit<br>
|
<b>V:</b> Zoom Fit<br>
|
||||||
<b>X:</b> Flip on X_axis<br>
|
<b>X:</b> Flip on X_axis<br>
|
||||||
<b>Y:</b> Flip on Y_axis<br>
|
<b>Y:</b> Flip on Y_axis<br>
|
||||||
|
<b>=:</b> Zoom Out<br>
|
||||||
|
<b>-:</b> Zoom In<br>
|
||||||
<br>
|
<br>
|
||||||
<b>Space:</b> En(Dis)able Obj Plot<br>
|
<b>Space:</b> En(Dis)able Obj Plot<br>
|
||||||
<b>CTRL+A:</b> Select All<br>
|
<b>CTRL+A:</b> Select All<br>
|
||||||
@@ -1215,6 +1217,17 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.corner_snap_btn.setDisabled(True)
|
self.corner_snap_btn.setDisabled(True)
|
||||||
self.snap_magnet.setDisabled(True)
|
self.snap_magnet.setDisabled(True)
|
||||||
|
|
||||||
|
def keyPressEvent(self, event):
|
||||||
|
|
||||||
|
if event.key() == QtCore.Qt.Key_1:
|
||||||
|
self.app.on_select_tab('project')
|
||||||
|
|
||||||
|
if event.key() == QtCore.Qt.Key_2:
|
||||||
|
self.app.on_select_tab('selected')
|
||||||
|
|
||||||
|
if event.key() == QtCore.Qt.Key_3:
|
||||||
|
self.app.on_select_tab('tool')
|
||||||
|
|
||||||
def dragEnterEvent(self, event):
|
def dragEnterEvent(self, event):
|
||||||
if event.mimeData().hasUrls:
|
if event.mimeData().hasUrls:
|
||||||
event.accept()
|
event.accept()
|
||||||
|
|||||||
@@ -387,17 +387,17 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
|||||||
if key == QtCore.Qt.Key_F2:
|
if key == QtCore.Qt.Key_F2:
|
||||||
webbrowser.open(self.app.video_url)
|
webbrowser.open(self.app.video_url)
|
||||||
|
|
||||||
# Zoom Fit
|
# Switch to Project Tab
|
||||||
if key == QtCore.Qt.Key_1:
|
if key == QtCore.Qt.Key_1:
|
||||||
self.app.on_zoom_fit(None)
|
self.app.on_select_tab('project')
|
||||||
|
|
||||||
# Zoom In
|
# Switch to Selected Tab
|
||||||
if key == QtCore.Qt.Key_2:
|
if key == QtCore.Qt.Key_2:
|
||||||
self.app.plotcanvas.zoom(1 / self.app.defaults['zoom_ratio'], self.app.mouse)
|
self.app.on_select_tab('selected')
|
||||||
|
|
||||||
# Zoom Out
|
# Switch to Tool Tab
|
||||||
if key == QtCore.Qt.Key_3:
|
if key == QtCore.Qt.Key_3:
|
||||||
self.app.plotcanvas.zoom(self.app.defaults['zoom_ratio'], self.app.mouse)
|
self.app.on_select_tab('tool')
|
||||||
|
|
||||||
# Delete
|
# Delete
|
||||||
if key == QtCore.Qt.Key_Delete and active:
|
if key == QtCore.Qt.Key_Delete and active:
|
||||||
@@ -477,6 +477,14 @@ class ObjectCollection(QtCore.QAbstractItemModel):
|
|||||||
if key == QtCore.Qt.Key_Y:
|
if key == QtCore.Qt.Key_Y:
|
||||||
self.app.on_flipy()
|
self.app.on_flipy()
|
||||||
|
|
||||||
|
# Zoom In
|
||||||
|
if key == QtCore.Qt.Key_Equal:
|
||||||
|
self.app.plotcanvas.zoom(1 / self.app.defaults['zoom_ratio'], self.app.mouse)
|
||||||
|
|
||||||
|
# Zoom Out
|
||||||
|
if key == QtCore.Qt.Key_Minus:
|
||||||
|
self.app.plotcanvas.zoom(self.app.defaults['zoom_ratio'], self.app.mouse)
|
||||||
|
|
||||||
# Show shortcut list
|
# Show shortcut list
|
||||||
if key == QtCore.Qt.Key_Ampersand:
|
if key == QtCore.Qt.Key_Ampersand:
|
||||||
self.app.on_shortcut_list()
|
self.app.on_shortcut_list()
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
- whatever was the visibility of the corresponding toolbar when we enter in the Editor, it will be set after exit from the Editor (either Geometry Editor or Excellon Editor).
|
- whatever was the visibility of the corresponding toolbar when we enter in the Editor, it will be set after exit from the Editor (either Geometry Editor or Excellon Editor).
|
||||||
- added ability to be detached for the tabs in the Notebook section (Project, Selected and Tool)
|
- added ability to be detached for the tabs in the Notebook section (Project, Selected and Tool)
|
||||||
- added ability for all detachable tabs to be restored to the same position from where they were detached.
|
- added ability for all detachable tabs to be restored to the same position from where they were detached.
|
||||||
|
- changed the shortcut keys for Zoom In, Zoom Out and Zoom Fit from 1, 2, 3 to '-', '=' respectively 'V'. Added new shortcut keys '1', '2', '3' for Select Project Tab, Select Selected Tab and Select Tool Tab.
|
||||||
3.3.2019
|
3.3.2019
|
||||||
|
|
||||||
- updated the new shortcut list with the shortcuts added lately
|
- updated the new shortcut list with the shortcuts added lately
|
||||||
|
|||||||
Reference in New Issue
Block a user