View-only: add toolip for disabled button

This commit is contained in:
tobtoht
2021-09-15 23:45:24 +02:00
parent b76636daa6
commit c9775affd2
+5 -1
View File
@@ -22,7 +22,11 @@ ViewOnlyDialog::ViewOnlyDialog(QSharedPointer<AppContext> ctx, QWidget *parent)
connect(ui->btn_Copy, &QPushButton::clicked, this, &ViewOnlyDialog::copyToClipboad);
connect(ui->btn_Save, &QPushButton::clicked, this, &ViewOnlyDialog::onWriteViewOnlyWallet);
ui->btn_Save->setEnabled(!m_ctx->wallet->viewOnly());
if (m_ctx->wallet->viewOnly()) {
ui->btn_Save->setEnabled(false);
ui->btn_Save->setToolTip("Wallet is already view-only");
}
this->adjustSize();
}