diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 113ead6..715da23 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -71,6 +71,10 @@ MainWindow::MainWindow(QWidget *parent) : // Initialize to the balances tab ui->tabWidget->setCurrentIndex(0); + // The zcashd tab is hidden by default, and only later added in if the embedded zcashd is started + zcashdtab = ui->tabWidget->widget(4); + ui->tabWidget->removeTab(4); + setupSendTab(); setupTransactionsTab(); setupRecieveTab(); diff --git a/src/mainwindow.h b/src/mainwindow.h index d208cb4..81914b9 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -43,6 +43,7 @@ public: QLabel* statusLabel; QLabel* statusIcon; QLabel* loadingLabel; + QWidget* zcashdtab; private: void closeEvent(QCloseEvent* event); diff --git a/src/rpc.cpp b/src/rpc.cpp index 0cef631..dc7a9f1 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -67,8 +67,10 @@ RPC::~RPC() { void RPC::setEZcashd(QProcess* p) { ezcashd = p; - if (ezcashd == nullptr) - ui->tabWidget->removeTab(4); + if (ezcashd) { + ui->tabWidget->addTab(main->zcashdtab, "zcashd"); + } + } void RPC::setConnection(Connection* c) {