- Tools Tab is hidden when entering into a Editor and showed on exit (this needs to be remade such that the toolbars state should be restored to whatever it was before entering in the Editor)

This commit is contained in:
Marius Stanciu 2020-07-25 12:39:39 +03:00 committed by Marius
parent 65d4f70b21
commit 8354bce680
2 changed files with 21 additions and 0 deletions

View File

@ -7,6 +7,10 @@ CHANGELOG for FlatCAM beta
=================================================
25.07.2020
- Tools Tab is hidden when entering into a Editor and showed on exit (this needs to be remade such that the toolbars state should be restored to whatever it was before entering in the Editor)
21.07.2020
- updated the FCRadio class with a method that allow disabling certain options

View File

@ -2236,6 +2236,11 @@ class App(QtCore.QObject):
# delete any selection shape that might be active as they are not relevant in Editor
self.delete_selection_shape()
# hide the Tools Toolbar
tools_tb = self.ui.toolbartools
if tools_tb.isVisible():
tools_tb.hide()
self.ui.plot_tab_area.setTabText(0, "EDITOR Area")
self.ui.plot_tab_area.protectTab(0)
self.inform.emit('[WARNING_NOTCL] %s' % _("Editor is activated ..."))
@ -2273,6 +2278,10 @@ class App(QtCore.QObject):
response = msgbox.clickedButton()
if response == bt_yes:
# show the Tools Toolbar
tools_tb = self.ui.toolbartools
tools_tb.show()
# clean the Tools Tab
self.ui.tool_scroll_area.takeWidget()
self.ui.tool_scroll_area.setWidget(QtWidgets.QWidget())
@ -2358,6 +2367,10 @@ class App(QtCore.QObject):
self.inform.emit('[selected] %s %s' % (obj_type, _("is updated, returning to App...")))
elif response == bt_no:
# show the Tools Toolbar
tools_tb = self.ui.toolbartools
tools_tb.show()
# clean the Tools Tab
self.ui.tool_scroll_area.takeWidget()
self.ui.tool_scroll_area.setWidget(QtWidgets.QWidget())
@ -2387,6 +2400,10 @@ class App(QtCore.QObject):
# Switch notebook to Selected page
# self.ui.notebook.setCurrentWidget(self.ui.selected_tab)
else:
# show the Tools Toolbar
tools_tb = self.ui.toolbartools
tools_tb.show()
if isinstance(edited_obj, GeometryObject):
self.geo_editor.deactivate()
elif isinstance(edited_obj, GerberObject):