]> git.mxchange.org Git - flightgear.git/commitdiff
fix "airport list" crash: I had wrongly assumed that now all PUCLASS_LIST
authormfranz <mfranz>
Sat, 20 May 2006 11:35:28 +0000 (11:35 +0000)
committermfranz <mfranz>
Sat, 20 May 2006 11:35:28 +0000 (11:35 +0000)
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.

src/GUI/dialog.cxx
src/GUI/dialog.hxx

index 803346588dc561d72b99537864cbf26eca7e005d..d99e2d8434ec82ff0451af47feeef969d0942593 100644 (file)
@@ -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<fgList *>(obj);
             pl->update();
         } else
@@ -929,7 +929,7 @@ FGDialog::PropertyObject::PropertyObject (const char * n,
 
 \f
 ////////////////////////////////////////////////////////////////////////
-// Implementation of fgList and derived pui widgets
+// Implementation of fgValueList and derived pui widgets
 ////////////////////////////////////////////////////////////////////////
 
 
index f30f3cf22da7d627ee1666bedb8767a1783d27ff..2a3195cb170183e777c84903a59e73786096f0af 100644 (file)
@@ -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 {