- solved the problem with not closing all the tabs in Plot Area when creating a New Project; the issue was that once a tab was removed the indexes are remade (when tab 0 is removed then tab 1 becomes tab 0 and so on)

This commit is contained in:
Marius Stanciu
2020-04-29 21:43:28 +03:00
committed by Marius
parent 1b0abc6798
commit 804b62af7f
5 changed files with 46 additions and 25 deletions

View File

@@ -17,7 +17,7 @@ if '_' not in builtins.__dict__:
class BookmarkManager(QtWidgets.QWidget):
mark_rows = QtCore.pyqtSignal()
# mark_rows = QtCore.pyqtSignal()
def __init__(self, app, storage, parent=None):
super(BookmarkManager, self).__init__(parent)
@@ -119,9 +119,18 @@ class BookmarkManager(QtWidgets.QWidget):
self.link_entry.returnPressed.connect(self.on_add_entry)
# closebtn.clicked.connect(self.accept)
self.table_widget.drag_drop_sig.connect(self.mark_table_rows_for_actions)
self.ui_connect()
self.build_bm_ui()
def ui_connect(self):
self.table_widget.drag_drop_sig.connect(self.mark_table_rows_for_actions)
def ui_disconnect(self):
try:
self.table_widget.drag_drop_sig.connect(self.mark_table_rows_for_actions)
except (TypeError, AttributeError):
pass
def build_bm_ui(self):
self.table_widget.setRowCount(len(self.bm_dict))
@@ -378,4 +387,5 @@ class BookmarkManager(QtWidgets.QWidget):
def closeEvent(self, QCloseEvent):
self.rebuild_actions()
self.ui_disconnect()
super().closeEvent(QCloseEvent)