From 368349aa5827ff940713ecc0e6c1dfd1395b971f Mon Sep 17 00:00:00 2001 From: mfranz Date: Sat, 20 May 2006 11:35:28 +0000 Subject: [PATCH] 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. --- src/GUI/dialog.cxx | 4 ++-- src/GUI/dialog.hxx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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 { -- 2.39.5