diff --git a/relational_gui/guihandler.py b/relational_gui/guihandler.py index 79c0b95..2ecf5b8 100644 --- a/relational_gui/guihandler.py +++ b/relational_gui/guihandler.py @@ -123,6 +123,12 @@ class relForm(QtWidgets.QMainWindow): QtWidgets.QMessageBox.information( self, QtWidgets.QApplication.translate("Form", "Version"), r) + def setHistoryShown(self, history_shown): + self.history_shown = history_shown + self.settings.setValue('history_shown', history_shown) + self.ui.lstHistory.setVisible(history_shown) + self.ui.actionShow_history.setChecked(history_shown) + def setMultiline(self, multiline): self.multiline = multiline self.settings.setValue('multiline', multiline) @@ -336,6 +342,7 @@ class relForm(QtWidgets.QMainWindow): self.updateRelations() self.setMultiline(self.settings.value('multiline', 'false') == 'true') + self.setHistoryShown(self.settings.value('history_shown', 'true') == 'true') self.ui.txtMultiQuery.setPlainText( self.settings.value('multiline/query', '')) try: diff --git a/relational_gui/maingui.ui b/relational_gui/maingui.ui index ee6f78b..6ac824a 100644 --- a/relational_gui/maingui.ui +++ b/relational_gui/maingui.ui @@ -378,6 +378,7 @@ Setti&ngs + @@ -1123,6 +1124,14 @@ Ctrl+L + + + true + + + Show history + + table @@ -1808,6 +1817,22 @@ + + actionShow_history + toggled(bool) + MainWindow + setHistoryShown(bool) + + + -1 + -1 + + + 318 + 247 + + + execute() @@ -1844,5 +1869,6 @@ saveSessionAs() manageSessions() setMultiline(bool) + setHistoryShown(bool)