Skip to content

Commit

Permalink
Merge pull request #444 from manisandro/signal_loop
Browse files Browse the repository at this point in the history
Fix stack overflow due to signal infinite loop
  • Loading branch information
rp- committed Nov 18, 2015
2 parents 8bfd285 + 2980031 commit 03497dd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/EditDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,19 @@ void EditDialog::editTextChanged()
{
if(ui->editorText->hasFocus())
{
hexEdit->blockSignals(true);
hexEdit->setData(ui->editorText->toPlainText().toUtf8());
hexEdit->blockSignals(false);
checkDataType();
}
}

void EditDialog::hexDataChanged()
{
// Update the text editor accordingly
ui->editorText->blockSignals(true);
ui->editorText->setPlainText(QString::fromUtf8(hexEdit->data().constData(), hexEdit->data().size()));
ui->editorText->blockSignals(false);
}

void EditDialog::checkDataType()
Expand Down

0 comments on commit 03497dd

Please sign in to comment.