diff --git a/consolegui/application/ConnectionTabs.py b/consolegui/application/ConnectionTabs.py index 415dfe8..b49186c 100644 --- a/consolegui/application/ConnectionTabs.py +++ b/consolegui/application/ConnectionTabs.py @@ -370,20 +370,6 @@ class ToolTabWidget(QtGui.QTabWidget): event.ignore() def _closeEvent(self): - if self.count() > 2: - text = _('At closing program all connects will be close!') - informative_text = _('Are you sure want to close program?') - reply = show_question(self, text, informative_text) - if reply == QtGui.QMessageBox.Yes: - for tab_num in range(self.count()): - if not self.close_tab(0, True): - return 1 - - self.app.exit() - - elif reply == QtGui.QMessageBox.No: - return 1 - else: for tab_num in range(self.count()): if not self.close_tab(0, True): return 1 diff --git a/consolegui/application/LeftMenu.py b/consolegui/application/LeftMenu.py index 022f9ea..92ee767 100755 --- a/consolegui/application/LeftMenu.py +++ b/consolegui/application/LeftMenu.py @@ -321,8 +321,11 @@ class LeftMenu(QtGui.QScrollArea): + diff) self.layout.addWidget(self.button_list[num_step]) - width_list.sort() - max_width = width_list.pop() + if width_list: + width_list.sort() + max_width = width_list.pop() + else: + max_width = 0 for num_step in range(len(steps)): self.button_list[num_step].setFixedWidth(max_width)