- added ability to turn ON/OFF the detachable capability of the tabs in Plot Tab Area through a context menu activated by right mouse button click on the Plot Tab Area header

This commit is contained in:
Marius Stanciu 2019-08-22 01:38:20 +03:00 committed by Marius
parent a365225416
commit 62e48eb545
2 changed files with 17 additions and 1 deletions

View File

@ -1585,10 +1585,20 @@ class App(QtCore.QObject):
# make the right click on the notebook tab connect to a function
self.ui.notebook.setupContextMenu()
self.ui.notebook.addContextMenu(
"Detachable Tabs", self.on_notebook_tab_rmb_click, initial_checked=self.defaults["global_tabs_detachable"])
_("Detachable Tabs"), self.on_notebook_tab_rmb_click,
initial_checked=self.defaults["global_tabs_detachable"])
# activate initial state
self.on_notebook_tab_rmb_click(self.defaults["global_tabs_detachable"])
# Plot Tab Area signals
# make the right click on the plot area tab connect to a function
self.ui.plot_tab_area.setupContextMenu()
self.ui.plot_tab_area.addContextMenu(
_("Detachable Tabs"), self.on_plot_area_tab_rmb_click,
initial_checked=self.defaults["global_tabs_detachable"])
# activate initial state
self.on_plot_area_tab_rmb_click(self.defaults["global_tabs_detachable"])
# Context Menu
self.ui.popmenu_disable.triggered.connect(lambda: self.toggle_plots(self.collection.get_selected()))
self.ui.popmenu_panel_toggle.triggered.connect(self.on_toggle_notebook)
@ -4611,6 +4621,10 @@ class App(QtCore.QObject):
self.ui.notebook.set_detachable(val=checked)
self.defaults["global_tabs_detachable"] = checked
def on_plot_area_tab_rmb_click(self, checked):
self.ui.plot_tab_area.set_detachable(val=checked)
self.defaults["global_tabs_detachable"] = checked
def on_deselect_all(self):
self.collection.set_all_inactive()
self.delete_selection_shape()

View File

@ -12,6 +12,8 @@ CAD program, and create G-Code for Isolation routing.
22.08.2019
- added ability to turn ON/OFF the detachable capability of the tabs in Notebook through a context menu activated by right mouse button click on the Notebook header
- added ability to turn ON/OFF the detachable capability of the tabs in Plot Tab Area through a context menu activated by right mouse button click on the Plot Tab Area header
21.08.2019