X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FGUI%2Fproperty_list.hxx;h=e11d5bfe896fb73e74f198fe04708e4321f8321a;hb=02a5261797998841e2c3d8580385e68a5d319929;hp=beeaeda220e55ee671081302ce844161d5c90d62;hpb=2100394117e7f68d449109af08b3dfa0655d1221;p=flightgear.git diff --git a/src/GUI/property_list.hxx b/src/GUI/property_list.hxx index beeaeda22..e11d5bfe8 100644 --- a/src/GUI/property_list.hxx +++ b/src/GUI/property_list.hxx @@ -23,10 +23,11 @@ #ifndef _PROPERTY_LIST_HXX #define _PROPERTY_LIST_HXX +#include #include #include -#include "dialog.hxx" +#include "FGPUIDialog.hxx" class PropertyList : public puaList, public SGPropertyChangeListener, public GUI_ID { @@ -41,7 +42,13 @@ public: void toggleVerbosity() { _verbose = !_verbose; } // overridden plib pui methods - virtual char *getStringValue(void) { return (char *)(_return ? _return->getPath(true) : ""); } + virtual char *getStringValue(void) + { + _return_path.clear(); + if (_return) + _return_path = _return->getPath(true); + return const_cast(_return_path.c_str()); + } //virtual char *getListStringValue() { return (char *)(_return ? _return->getPath(true) : ""); } virtual void setValue(const char *); @@ -81,6 +88,7 @@ private: bool _dot_files; // . and .. pseudo-dirs currently shown? bool _verbose; // show SGPropertyNode flags + std::string _return_path; };