diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 82bffd91..3fd2e8e2 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="1" android:versionName="1.2.04"> diff --git a/src/Comm/ShowMessage.cpp b/src/Comm/ShowMessage.cpp index bfb86f37..9df06ac2 100644 --- a/src/Comm/ShowMessage.cpp +++ b/src/Comm/ShowMessage.cpp @@ -70,8 +70,7 @@ bool ShowMessage::eventFilter(QObject* watch, QEvent* evn) { } if (evn->type() == QEvent::MouseButtonPress) { - if (ui->btnCancel->isHidden() && ui->btnCopy->isHidden() && - ui->btnOk->isHidden()) { + if (btn_count == 0) { on_btnCancel_clicked(); } @@ -111,11 +110,8 @@ void ShowMessage::init() { int nEditH = mw_one->m_Todo->getEditTextHeight(ui->editMsg); int nH = 0; - if (!ui->btnCancel->isHidden()) - nH = nEditH + ui->btnCancel->height() + ui->lblTitle->height() + - ui->hframe->height() + 40; - else - nH = nEditH + ui->lblTitle->height() + ui->hframe->height() + 50; + nH = nEditH + ui->btnCancel->height() + ui->lblTitle->height() + + ui->hframe->height() + 50; if (nH > mw_one->height()) nH = mw_one->height() - 10; ui->frame->setFixedHeight(nH); @@ -138,7 +134,7 @@ bool ShowMessage::showMsg(QString title, QString msgtxt, int btnCount) { if (btnCount == 0) { ui->btnCancel->hide(); ui->btnCopy->hide(); - ui->btnOk->hide(); + ui->btnOk->show(); ui->btnDel->hide(); } if (btnCount == 1) { @@ -168,6 +164,8 @@ bool ShowMessage::showMsg(QString title, QString msgtxt, int btnCount) { ui->btnDel->show(); } + btn_count = btnCount; + ui->lblTitle->setText(title); ui->editMsg->setText(msgtxt); diff --git a/src/Comm/ShowMessage.h b/src/Comm/ShowMessage.h index ceaa04d2..07fd988e 100644 --- a/src/Comm/ShowMessage.h +++ b/src/Comm/ShowMessage.h @@ -44,6 +44,7 @@ class ShowMessage : public QDialog { private: void init(); + int btn_count = 0; }; #endif // SHOWMESSAGE_H diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index d3ca8d24..8c41c52e 100755 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -6,7 +6,7 @@ QList PointList; QList doubleList; -QString ver = "1.2.03"; +QString ver = "1.2.04"; QGridLayout *gl1; QTreeWidgetItem *parentItem; bool isrbFreq = true;