Apply the math options after dialog be closed

This commit is contained in:
dreamsourcelabTAI 2024-04-07 11:10:17 +08:00
parent cb691623c0
commit eb069d0b69
3 changed files with 10 additions and 2 deletions

View File

@ -174,9 +174,12 @@ void MathOptions::retranslateUi()
void MathOptions::accept()
{
using namespace Qt;
using namespace Qt;
QDialog::accept();
}
void MathOptions::Apply()
{
int src1 = -1;
int src2 = -1;
data::MathStack::MathType type = data::MathStack::MATH_ADD;

View File

@ -56,6 +56,8 @@ public:
MathOptions(SigSession *session, QWidget *parent);
~MathOptions();
void Apply();
private:
void retranslateUi();

View File

@ -285,7 +285,10 @@ void TrigBar::on_actionFft_triggered()
void TrigBar::on_actionMath_triggered()
{
pv::dialogs::MathOptions math_dlg(_session, this);
math_dlg.exec();
if (math_dlg.exec() == QDialog::Accepted)
{
math_dlg.Apply();
}
}
void TrigBar::on_actionDark_triggered()