EditDialog: Fix text editor when NULL chars are typed in hex editor

When using the hex editor widget of the Edit Dialog to insert a NULL
character and then changing to the text editor without saving and
reopening the window first lead to the text being truncated at the NULL
character.
This commit is contained in:
Martin Kleusberg
2014-06-12 18:53:53 +02:00
parent b407704959
commit 2b65bbcea2

View File

@@ -139,7 +139,7 @@ void EditDialog::editTextChanged()
void EditDialog::hexDataChanged()
{
// Update the text editor accordingly
ui->editorText->setPlainText(hexEdit->data());
ui->editorText->setPlainText(QString::fromUtf8(hexEdit->data().constData(), hexEdit->data().size()));
}
void EditDialog::checkDataType()