- minor changes
This commit is contained in:
@@ -3347,7 +3347,7 @@ class FCDetachableTab2(FCDetachableTab):
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
self.__auto_remove_closed_tab = True
|
||||
self._auto_remove_closed_tab = True
|
||||
|
||||
self.tabBar.onCloseTabSignal.connect(self.on_closetab_middle_button)
|
||||
|
||||
@@ -3359,7 +3359,7 @@ class FCDetachableTab2(FCDetachableTab):
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
return self.__auto_remove_closed_tab
|
||||
return self._auto_remove_closed_tab
|
||||
|
||||
@auto_remove_closed_tab.setter
|
||||
def auto_remove_closed_tab(self, val):
|
||||
@@ -3371,7 +3371,7 @@ class FCDetachableTab2(FCDetachableTab):
|
||||
:return:
|
||||
:rtype:
|
||||
"""
|
||||
self.__auto_remove_closed_tab = val
|
||||
self._auto_remove_closed_tab = val
|
||||
|
||||
def on_closetab_middle_button(self, current_index):
|
||||
"""
|
||||
@@ -3395,7 +3395,7 @@ class FCDetachableTab2(FCDetachableTab):
|
||||
tab_name = self.widget(currentIndex).objectName()
|
||||
self.tab_closed_signal.emit(tab_name, currentIndex)
|
||||
|
||||
if self.__auto_remove_closed_tab:
|
||||
if self._auto_remove_closed_tab:
|
||||
self.removeTab(currentIndex)
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ from PyQt6.QtCore import QSettings
|
||||
import platform
|
||||
|
||||
from appGUI.GUIElements import *
|
||||
|
||||
from appGUI.preferences.cncjob.CNCJobPreferencesUI import CNCJobPreferencesUI
|
||||
from appGUI.preferences.excellon.ExcellonPreferencesUI import ExcellonPreferencesUI
|
||||
from appGUI.preferences.general.GeneralPreferencesUI import GeneralPreferencesUI
|
||||
@@ -1988,6 +1989,8 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
self.infobar.setContextMenuPolicy(QtCore.Qt.ContextMenuPolicy.ActionsContextMenu)
|
||||
self.build_infobar_context_menu()
|
||||
|
||||
self.plot_tab_area.tab_detached.connect(self.on_tab_detached)
|
||||
|
||||
# self.screenChanged.connect(self.on_screen_change)
|
||||
|
||||
# def on_screen_change(self, old_screen, new_screen):
|
||||
@@ -2006,6 +2009,14 @@ class MainGUI(QtWidgets.QMainWindow):
|
||||
# ratio = new_pixel_ratio / old_pixel_ratio
|
||||
# self.app.plotcanvas.dpi = self.app.plotcanvas.dpi * ratio
|
||||
|
||||
def on_tab_detached(self, tab_detached, tab_detached_name):
|
||||
if tab_detached_name == 'FlatCAM Plot Area':
|
||||
pass
|
||||
# print(tab_detached_name)
|
||||
# self.app.plotcanvas.unfreeze()
|
||||
# self.app.plotcanvas.native.setParent(tab_detached)
|
||||
# self.app.plotcanvas.freeze()
|
||||
|
||||
def set_ui_title(self, name):
|
||||
"""
|
||||
Sets the title of the main window.
|
||||
|
||||
Reference in New Issue
Block a user