Various tweaks and fixes, mostly to the drop down lists

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@620 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-08-23 23:29:20 +00:00
parent dc9f08b311
commit d68f73edfc
17 changed files with 246 additions and 92 deletions
+8 -3
View File
@@ -138,7 +138,7 @@ void DropDownList::show(bool in_place, wxPoint pos, RealRect* rect) {
if (selected_item == NO_SELECTION && itemCount() > 0) selected_item = 0; // select first item by default
mouse_down = false;
Window::Show();
if (!parent_menu && GetParent()->HasCapture()) {
if (isRoot() && GetParent()->HasCapture()) {
// release capture on parent
GetParent()->ReleaseMouse();
}
@@ -168,7 +168,7 @@ void DropDownList::hide(bool event, bool allow_veto) {
void DropDownList::realHide() {
if (!IsShown()) return;
Window::Hide();
// onHide();
onHide();
hideSubMenu();
if (parent_menu) {
parent_menu->open_sub_menu = nullptr;
@@ -226,7 +226,12 @@ int DropDownList::itemPosition(size_t item) const {
void DropDownList::redrawArrowOnParent() {
if (viewer) {
ValueEditor* e = viewer->getEditor();
if (e) e->redraw();
if (e && viewer->viewer.nativeLook()) {
CardEditor& editor = static_cast<CardEditor&>(viewer->viewer);
shared_ptr<RotatedDC> dcP = editor.overdrawDC();
RotatedDC& dc = *dcP;
draw_drop_down_arrow(&editor, dc.getDC(), dc.tr(viewer->getStyle()->getRect().grow(1)), IsShown());
}
}
}