Skip to content
Permalink
Browse files

ecere/gui/ListBox: Fixed clearing of data in UnsetData()

- After clearing cell, editor would be populated with previous value
  • Loading branch information...
jerstlouis committed Jan 5, 2016
1 parent 32f82b0 commit 49721ce4da365a9813bab5987e896aef5fc94190
Showing with 3 additions and 0 deletions.
  1. +3 −0 ecere/src/gui/controls/ListBox.ec
@@ -662,8 +662,11 @@ public:
}
else
{
int size = (field.dataType && field.dataType.typeSize) ?
(sizeof(class ListBoxCell) + field.dataType.typeSize - sizeof(void *)) : sizeof(class ListBoxCell);
// Free old data first
((void (*)(void *, void *))(void *)dataType._vTbl[__ecereVMethodID_class_OnFree])(dataType, cell.data);
FillBytes(cell.data, 0, size - (uint)(uintptr)&((ListBoxCell)0).data);
}
}
cell.isSet = false;

0 comments on commit 49721ce

Please sign in to comment.
You can’t perform that action at this time.