Ecere Software
/
sdk
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32f82b0
)
ecere/gui/ListBox: Fixed clearing of data in UnsetData()
author
Jerome St-Louis
<jerome@ecere.com>
Tue, 5 Jan 2016 21:04:54 +0000
(16:04 -0500)
committer
Jerome St-Louis
<jerome@ecere.com>
Tue, 5 Jan 2016 21:04:54 +0000
(16:04 -0500)
- After clearing cell, editor would be populated with previous value
ecere/src/gui/controls/ListBox.ec
patch
|
blob
|
history
diff --git
a/ecere/src/gui/controls/ListBox.ec
b/ecere/src/gui/controls/ListBox.ec
index
da9fe0b
..
cb5cb37
100644
(file)
--- a/
ecere/src/gui/controls/ListBox.ec
+++ b/
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;