From 390c1f4d1ff9b96c0b11dfd52f0f1f5589a60160 Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 17 Jan 2009 21:05:22 +0000 Subject: [PATCH] - ctrl-click in the property browser is for toggling bools, not dragging - add vertical arg to sliders (apparently nobody ever use a vertical one :-) - simplification --- src/GUI/dialog.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 0ba1880f4..9db2e77eb 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -212,6 +212,8 @@ int fgPopup::checkHit(int button, int updown, int x, int y) int global_resize = fgGetKeyModifiers() & KEYMOD_CTRL; int hit = getHitObjects(this, x, y); + if (hit & PUCLASS_LIST) // ctrl-click in property browser (toggle bool) + return result; if (!global_resize && hit & (PUCLASS_BUTTON|PUCLASS_ONESHOT|PUCLASS_INPUT|PUCLASS_LARGEINPUT)) return result; @@ -752,7 +754,7 @@ FGDialog::makeObject (SGPropertyNode *props, int parentWidth, int parentHeight) } else if (type == "slider") { bool vertical = props->getBoolValue("vertical", false); - puSlider *obj = new puSlider(x, y, (vertical ? height : width)); + puSlider *obj = new puSlider(x, y, (vertical ? height : width), vertical); obj->setMinValue(props->getFloatValue("min", 0.0)); obj->setMaxValue(props->getFloatValue("max", 1.0)); setupObject(obj, props); @@ -776,12 +778,11 @@ FGDialog::makeObject (SGPropertyNode *props, int parentWidth, int parentHeight) puaLargeInput * obj = new puaLargeInput(x, y, x + width, x + height, 2, slider_width, wrap); - if (props->hasValue("editable")) { - if (props->getBoolValue("editable")==false) - obj->disableInput(); - else - obj->enableInput(); - } + if (props->getBoolValue("editable")) + obj->enableInput(); + else + obj->disableInput(); + if (presetSize) obj->setSize(width, height); setupObject(obj, props);