Browse Source

Allow MainWin::readSettings() to skip geometry restoration when killing the blockchain (it messes up widgets position when in full screen)

cl-refactor
Giacomo Tazzari 10 years ago
parent
commit
59a858f45d
  1. 7
      alethzero/MainWin.cpp
  2. 3
      alethzero/MainWin.h

7
alethzero/MainWin.cpp

@ -504,11 +504,12 @@ void Main::writeSettings()
s.setValue("windowState", saveState()); s.setValue("windowState", saveState());
} }
void Main::readSettings() void Main::readSettings(bool _skipGeometry)
{ {
QSettings s("ethereum", "alethzero"); QSettings s("ethereum", "alethzero");
restoreGeometry(s.value("geometry").toByteArray()); if (!_skipGeometry)
restoreGeometry(s.value("geometry").toByteArray());
restoreState(s.value("windowState").toByteArray()); restoreState(s.value("windowState").toByteArray());
m_myKeys.clear(); m_myKeys.clear();
@ -1352,7 +1353,7 @@ void Main::on_killBlockchain_triggered()
m_client.reset(); m_client.reset();
m_client.reset(new Client("AlethZero", Address(), string(), true)); m_client.reset(new Client("AlethZero", Address(), string(), true));
m_ethereum->setClient(m_client.get()); m_ethereum->setClient(m_client.get());
readSettings(); readSettings(true);
installWatches(); installWatches();
refreshAll(); refreshAll();
} }

3
alethzero/MainWin.h

@ -157,7 +157,8 @@ private:
void alterDebugStateGroup(bool _enable) const; void alterDebugStateGroup(bool _enable) const;
void updateFee(); void updateFee();
void readSettings(); void readSettings(bool _skipGeometry);
void readSettings() { readSettings(false); }
void writeSettings(); void writeSettings();
bool isCreation() const; bool isCreation() const;

Loading…
Cancel
Save