- work on identification of changes in Preferences tab
This commit is contained in:
@@ -13,6 +13,7 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
- changed the order of the menu entries in the FIle -> Open ...
|
- changed the order of the menu entries in the FIle -> Open ...
|
||||||
- organized the list of recent files so the Project entries are to the top and separated from the other types of file
|
- organized the list of recent files so the Project entries are to the top and separated from the other types of file
|
||||||
|
- work on identification of changes in Preferences tab
|
||||||
|
|
||||||
30.07.2019
|
30.07.2019
|
||||||
|
|
||||||
|
|||||||
@@ -810,7 +810,7 @@ class FlatCAMGUI(QtWidgets.QMainWindow):
|
|||||||
self.right_lay.setContentsMargins(0, 0, 0, 0)
|
self.right_lay.setContentsMargins(0, 0, 0, 0)
|
||||||
self.right_widget.setLayout(self.right_lay)
|
self.right_widget.setLayout(self.right_lay)
|
||||||
# self.plot_tab_area = FCTab()
|
# self.plot_tab_area = FCTab()
|
||||||
self.plot_tab_area = FCDetachableTab(protect=False, protect_by_name=[_('Plot Area')])
|
self.plot_tab_area = FCDetachableTab2(protect=False, protect_by_name=[_('Plot Area')])
|
||||||
self.plot_tab_area.useOldIndex(True)
|
self.plot_tab_area.useOldIndex(True)
|
||||||
|
|
||||||
self.right_lay.addWidget(self.plot_tab_area)
|
self.right_lay.addWidget(self.plot_tab_area)
|
||||||
|
|||||||
@@ -884,6 +884,7 @@ class FCDetachableTab(QtWidgets.QTabWidget):
|
|||||||
:param currentIndex:
|
:param currentIndex:
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
self.removeTab(currentIndex)
|
self.removeTab(currentIndex)
|
||||||
|
|
||||||
def protectTab(self, currentIndex):
|
def protectTab(self, currentIndex):
|
||||||
@@ -1348,6 +1349,25 @@ class FCDetachableTab(QtWidgets.QTabWidget):
|
|||||||
self.detachedTabDropSignal.emit(name, index, dropPos)
|
self.detachedTabDropSignal.emit(name, index, dropPos)
|
||||||
|
|
||||||
|
|
||||||
|
class FCDetachableTab2(FCDetachableTab):
|
||||||
|
|
||||||
|
def __init__(self, protect=None, protect_by_name=None, parent=None):
|
||||||
|
super(FCDetachableTab2, self).__init__(protect=protect, protect_by_name=protect_by_name, parent=parent)
|
||||||
|
|
||||||
|
def closeTab(self, currentIndex):
|
||||||
|
"""
|
||||||
|
Slot connected to the tabCloseRequested signal
|
||||||
|
|
||||||
|
:param currentIndex:
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
idx = self.currentIndex()
|
||||||
|
if self.tabText(idx) == _("Preferences"):
|
||||||
|
#TODO work on this, identify if widget changed and print a status message
|
||||||
|
pass
|
||||||
|
|
||||||
|
self.removeTab(currentIndex)
|
||||||
|
|
||||||
class VerticalScrollArea(QtWidgets.QScrollArea):
|
class VerticalScrollArea(QtWidgets.QScrollArea):
|
||||||
"""
|
"""
|
||||||
This widget extends QtGui.QScrollArea to make a vertical-only
|
This widget extends QtGui.QScrollArea to make a vertical-only
|
||||||
|
|||||||
Reference in New Issue
Block a user