From c8553cee151e7cabe70fb54e5e0db6ad5eb76b92 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Sat, 13 Jun 2020 00:44:53 +0200 Subject: [PATCH] Disallow chat input when no contact is selected #137 --- src/mainwindow.cpp | 3 +++ src/mainwindow.ui | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ef5845b..d839cea 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1344,6 +1344,8 @@ void MainWindow::setupTransactionsTab() { void MainWindow::setupchatTab() { + ui->memoTxtChat->setEnabled(false); + /////////////Setting Icons for Chattab and different themes auto theme = Settings::getInstance()->get_theme_name(); @@ -1530,6 +1532,7 @@ void MainWindow::setupchatTab() { ui->listContactWidget->addAction(HushAction); ui->listContactWidget->addAction(requestHushAction); ui->listContactWidget->addAction(subatomicAction); + ui->memoTxtChat->setEnabled(true); /*QObject::connect(requestHushAction, &QAction::triggered, [=]() { QModelIndex index = ui->listContactWidget->currentIndex(); diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 8471227..cf6fa57 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -59,7 +59,7 @@ - 2 + 5