multiple choice checklists also work in non-native look

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1468 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-08-03 14:50:30 +00:00
parent 17c766c8fc
commit 2bc67b964f
2 changed files with 7 additions and 4 deletions
+3
View File
@@ -113,6 +113,9 @@ void MultipleChoiceValueEditor::determineSize(bool force_fit) {
bool MultipleChoiceValueEditor::onLeftDown(const RealPoint& pos, wxMouseEvent& ev) {
// find item under cursor
if (style().render_style & RENDER_CHECKLIST) {
// TODO: determine actual item height
if (item_height == 0) item_height = 16;
int id = (int)(pos.y / item_height);
int end = field().choices->lastId();
if (id >= 0 && id < end) {