Explorar o código

- added 'FlatCAM ' prefix to any detached tab, for easy identification

Marius Stanciu %!s(int64=7) %!d(string=hai) anos
pai
achega
a879803f97
Modificáronse 2 ficheiros con 5 adicións e 2 borrados
  1. 4 2
      GUIElements.py
  2. 1 0
      README.md

+ 4 - 2
GUIElements.py

@@ -642,8 +642,8 @@ class FCDetachableTab(QtWidgets.QTabWidget):
 
         self.old_index = index
 
-        # Get the tab content
-        name = self.tabText(index)
+        # Get the tab content and add name FlatCAM to the tab so we know on which app is this tab linked
+        name = "FlatCAM " + self.tabText(index)
         icon = self.tabIcon(index)
         if icon.isNull():
             icon = self.window().windowIcon()
@@ -684,6 +684,8 @@ class FCDetachableTab(QtWidgets.QTabWidget):
 
         # Remove the reference
         del self.detachedTabs[name]
+        # make sure that we strip the 'FlatCAM' part of the detached name otherwise the tab name will be too long
+        name = name.partition(' ')[2]
 
         # helps in restoring the tab to the same index that it was before was detached
         insert_index = self.old_index if self.use_old_index is True else insertAt

+ 1 - 0
README.md

@@ -12,6 +12,7 @@ CAD program, and create G-Code for Isolation routing.
 14.02.2019
 
 - added total travel distance for CNCJob object created from Excellon Object in the CNCJob Selected tab
+- added 'FlatCAM ' prefix to any detached tab, for easy identification
 
 13.02.2019