From: mfranz Date: Sat, 20 May 2006 11:35:28 +0000 (+0000) Subject: fix "airport list" crash: I had wrongly assumed that now all PUCLASS_LIST X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=368349aa5827ff940713ecc0e6c1dfd1395b971f;p=flightgear.git fix "airport list" crash: I had wrongly assumed that now all PUCLASS_LIST would actually be an fgList class. The airport list is a PUCLASS_LIST, too, so we have to check for that. -> Use getTypeString() for identification. --- diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index 803346588..d99e2d843 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -384,7 +384,7 @@ FGDialog::updateValues (const char * objectName) continue; puObject *obj = _propertyObjects[i]->object; - if (obj->getType() & PUCLASS_LIST) { + if (!strcmp(obj->getTypeString(), "fgList")) { fgList *pl = static_cast(obj); pl->update(); } else @@ -929,7 +929,7 @@ FGDialog::PropertyObject::PropertyObject (const char * n, //////////////////////////////////////////////////////////////////////// -// Implementation of fgList and derived pui widgets +// Implementation of fgValueList and derived pui widgets //////////////////////////////////////////////////////////////////////// diff --git a/src/GUI/dialog.hxx b/src/GUI/dialog.hxx index f30f3cf22..2a3195cb1 100644 --- a/src/GUI/dialog.hxx +++ b/src/GUI/dialog.hxx @@ -204,6 +204,7 @@ public: fgList(int x1, int y1, int x2, int y2, SGPropertyNode *p, int sw) : fgValueList(p), puList(x1, y1, x2, y2, _list, sw) {} virtual void update(); + virtual const char *getTypeString() { return "fgList"; } }; class fgComboBox : public fgValueList, public puaComboBox {