gui: disable quote option if no text is selected in chat

This commit is contained in:
chelovechishko 2018-07-04 00:19:36 +09:00
parent 5925aa06fe
commit b950e12bcf

View File

@ -1096,6 +1096,10 @@ void ChatWidget::contextMenuTextBrowser(QPoint point)
contextMnu->addSeparator(); contextMnu->addSeparator();
contextMnu->addAction(ui->actionClearChatHistory); contextMnu->addAction(ui->actionClearChatHistory);
contextMnu->addAction(ui->actionQuote); contextMnu->addAction(ui->actionQuote);
if (ui->textBrowser->textCursor().selection().toPlainText().length() == 0)
ui->actionQuote->setEnabled(false);
else
ui->actionQuote->setEnabled(true);
contextMnu->addAction(ui->actionDropPlacemark); contextMnu->addAction(ui->actionDropPlacemark);
if(ui->textBrowser->checkImage(point)) if(ui->textBrowser->checkImage(point))