forked from Ivasoft/DSView
Apply the math options after dialog be closed
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -56,6 +56,8 @@ public:
|
||||
MathOptions(SigSession *session, QWidget *parent);
|
||||
~MathOptions();
|
||||
|
||||
void Apply();
|
||||
|
||||
private:
|
||||
void retranslateUi();
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user