diff --git a/src/EditDialog.cpp b/src/EditDialog.cpp index 64d72257..08befa2e 100644 --- a/src/EditDialog.cpp +++ b/src/EditDialog.cpp @@ -144,12 +144,14 @@ void EditDialog::hexDataChanged() void EditDialog::checkDataType() { - // Check if data is text only ui->comboEditor->setVisible(true); + + // Check if data is text only if(QString(hexEdit->data()).toUtf8() == hexEdit->data()) // Any proper way?? { ui->editorStack->setCurrentIndex(0); + ui->labelBinayWarning->setVisible(false); ui->labelType->setText(tr("Type of data currently in cell: Text / Numeric")); ui->labelSize->setText(tr("%n char(s)", "", hexEdit->data().length())); } else { @@ -168,6 +170,7 @@ void EditDialog::checkDataType() } else { // It's not. So it's probably some random binary data. + ui->labelBinayWarning->setVisible(true); ui->labelType->setText(tr("Type of data currently in cell: Binary")); ui->labelSize->setText(tr("%n byte(s)", "", hexEdit->data().length())); } diff --git a/src/EditDialog.ui b/src/EditDialog.ui index 835b5563..0c8963c8 100644 --- a/src/EditDialog.ui +++ b/src/EditDialog.ui @@ -89,13 +89,26 @@ 0 - - - This area displays information about the data present in this database cell - - - false - + + + + + + <html><head/><body><p><span style=" font-weight:600; color:#c00000;">Warning: Editing binary content in text mode may result in corrupted data!</span></p></body></html> + + + + + + + This area displays information about the data present in this database cell + + + false + + + +