1
0
Fork 0

GUI: revalidate when toggling 'Keep Size' in AssembleDialog (#1648)

* GUI: revalidate when toggling 'Keep Size' in AssembleDialog

* GUI: remove code duplication
This commit is contained in:
Georgeto 2017-07-25 13:39:29 +02:00 committed by Duncan Ogilvie
parent c64777e32a
commit 2c3a16fbb5
3 changed files with 10 additions and 1 deletions

View File

@ -173,7 +173,7 @@ void AssembleDialog::on_lineEdit_textChanged(const QString & arg1)
void AssembleDialog::on_checkBoxKeepSize_clicked(bool checked)
{
bKeepSizeChecked = checked;
mValidateThread->textChanged(ui->lineEdit->text());
mValidateThread->additionalStateChanged();
}
void AssembleDialog::on_checkBoxFillWithNops_clicked(bool checked)

View File

@ -38,6 +38,14 @@ void ValidateExpressionThread::textChanged(QString text)
mExpressionMutex.unlock();
}
void ValidateExpressionThread::additionalStateChanged()
{
mExpressionMutex.lock();
mExpressionChanged = true;
mExpressionMutex.unlock();
}
void ValidateExpressionThread::setOnExpressionChangedCallback(EXPRESSIONCHANGEDCB callback)
{
mOnExpressionChangedCallback = callback;

View File

@ -24,6 +24,7 @@ signals:
public slots:
void textChanged(QString text);
void additionalStateChanged();
void setOnExpressionChangedCallback(EXPRESSIONCHANGEDCB callback);
private: