Skip to content

Commit f81da0d

Browse files
committed
Remove "NULL" in margin of editor in Edit dialog for empty cells
When clicking on a cell with a NULL value while, the Edit dialog switches into text mode and shows an empty text with "NULL" written in the line number margin. When then changing to an empty string cell, the text in the editor did not change (it is still empty after all). This prevented an action from triggering which meant that the "NULL" text in the line number marging was not removed. See issue #2204.
1 parent d3c69ad commit f81da0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/EditDialog.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ void EditDialog::loadData(const QByteArray& bArrdata)
210210
case XML:
211211
// Can be stored in any widget, except the ImageViewer
212212

213+
sciEdit->clearTextInMargin();
214+
213215
switch (editMode) {
214216
case TextEditor:
215217
case JsonEditor:
@@ -859,10 +861,8 @@ void EditDialog::editTextChanged()
859861
if (dataType == Null && isModified && dataLength != 0)
860862
dataType = Text;
861863

862-
if (dataType != Null) {
863-
sciEdit->clearTextInMargin();
864+
if (dataType != Null)
864865
ui->labelType->setText(tr("Type of data currently in cell: Text / Numeric"));
865-
}
866866
ui->labelSize->setText(tr("%n character(s)", "", dataLength));
867867
}
868868
}

0 commit comments

Comments
 (0)