trestore current path after modifying it. - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit c10bacca28087af54b9b6e51d0a8ffd39db35b75
DIR parent c03705b2a5169766246c591edad8a7691fb3e3cb
HTML Author: Amir Taaki <genjix@riseup.net>
Date: Sun, 8 Jul 2012 10:53:49 +0100
restore current path after modifying it.
Diffstat:
M lib/gui_lite.py | 7 +++++++
1 file changed, 7 insertions(+), 0 deletions(-)
---
DIR diff --git a/lib/gui_lite.py b/lib/gui_lite.py
t@@ -48,6 +48,9 @@ class ElectrumGui:
def __init__(self, wallet):
self.wallet = wallet
self.app = QApplication(sys.argv)
+ # Should probably not modify the current path but instead
+ # change the behaviour of rsrc(...)
+ self.old_path = QDir.currentPath()
cd_data_dir()
with open(rsrc("style.css")) as style_file:
self.app.setStyleSheet(style_file.read())
t@@ -57,6 +60,10 @@ class ElectrumGui:
self.mini = MiniWindow(actuator, self.expand)
driver = MiniDriver(self.wallet, self.mini)
+ # Reset path back to original value now that loading the GUI
+ # is completed.
+ QDir.setCurrent(self.old_path)
+
if url:
self.set_url(url)