debuged some horrible race conditions & deadlocks

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@160 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-12-24 00:12:06 +00:00
parent 5bed5892f3
commit 40606d975e
6 changed files with 25 additions and 15 deletions
+8 -2
View File
@@ -66,7 +66,9 @@ DropDownChoiceList::DropDownChoiceList(Window* parent, bool is_submenu, ChoiceVa
, group(group)
, cve(cve)
{
icon_size.width = 16;
icon_size.width = 16;
icon_size.height = 16;
item_size.height = max(16., item_size.height);
}
size_t DropDownChoiceList::itemCount() const {
@@ -183,7 +185,9 @@ void DropDownChoiceList::generateThumbnailImages() {
void DropDownChoiceList::onIdle(wxIdleEvent& ev) {
if (!isRoot()) return;
thumbnail_thread.done(&cve);
if (thumbnail_thread.done(&cve)) {
Refresh(false);
}
}
BEGIN_EVENT_TABLE(DropDownChoiceList, DropDownList)
@@ -201,6 +205,8 @@ ChoiceValueEditor::~ChoiceValueEditor() {
}
void ChoiceValueEditor::onLeftDown(const RealPoint& pos, wxMouseEvent& ev) {
//HACK TODO REMOVEME
thumbnail_thread.abortAll();
drop_down->onMouseInParent(ev, style().popup_style == POPUP_DROPDOWN_IN_PLACE && !nativeLook());
}
void ChoiceValueEditor::onChar(wxKeyEvent& ev) {