Bitcoin-Qt: save and restore position of debug window

- move the code for saving and restoring window positions from BitcoinGUI
  to GUIUtil, make it more generic and also use it for saving/restoring
  debug window positions
This commit is contained in:
Philip Kaufmann
2013-07-13 13:14:23 +02:00
parent c4316fefa5
commit c431e9f1f0
5 changed files with 34 additions and 30 deletions

View File

@@ -187,6 +187,7 @@ RPCConsole::RPCConsole(QWidget *parent) :
historyPtr(0)
{
ui->setupUi(this);
GUIUtil::restoreWindowGeometry("nRPCConsoleWindow", this->size(), this);
#ifndef Q_OS_MAC
ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export"));
@@ -209,6 +210,7 @@ RPCConsole::RPCConsole(QWidget *parent) :
RPCConsole::~RPCConsole()
{
GUIUtil::saveWindowGeometry("nRPCConsoleWindow", this);
emit stopExecutor();
delete ui;
}