store qt-console-history in wallet file (fix #5563)

This commit is contained in:
ThomasV 2019-08-25 11:39:11 +02:00
parent 95383a5820
commit 2b52ee26e6

View file

@ -2168,7 +2168,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
def update_console(self):
console = self.console
console.history = self.config.get("console-history",[])
console.history = self.wallet.storage.get("qt-console-history", [])
console.history_index = len(console.history)
console.updateNamespace({
@ -3364,8 +3364,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
g = self.geometry()
self.wallet.storage.put("winpos-qt", [g.left(),g.top(),
g.width(),g.height()])
self.config.set_key("console-history", self.console.history[-50:],
True)
self.wallet.storage.put("qt-console-history", self.console.history[-50:])
if self.qr_window:
self.qr_window.close()
self.close_wallet()