diff --git a/StdGadgetTree.cpp b/StdGadgetTree.cpp index 869837a..ed15107 100644 --- a/StdGadgetTree.cpp +++ b/StdGadgetTree.cpp @@ -180,6 +180,8 @@ void CStdGadgetTree::setContent(int a_contentID) { ASSERTM((a_contentID >= 0), "CStdGadgetTree::setContent() => Invalid content ID passed in"); + m_contentID = a_contentID; + #ifdef __amigaos__ SetGadgetAttrs((struct Gadget *) m_poGadget, NULL, NULL, LISTBROWSER_Labels, (ULONG) NULL, TAG_DONE); @@ -282,7 +284,9 @@ int CStdGadgetTree::setContent(StdList &a_items) #endif /* ! QT_GUI_LIB */ - return m_nextContentID++; + m_contentID = m_nextContentID++; + + return m_contentID; } /** diff --git a/StdGadgets.h b/StdGadgets.h index 4c990f8..8ec22c1 100644 --- a/StdGadgets.h +++ b/StdGadgets.h @@ -412,6 +412,7 @@ class CStdGadgetTree : public CStdGadget { private: + int m_contentID; /**< The content ID of the file list currently in use */ int m_nextContentID; /**< The next content ID that will be assigned to a new list */ #ifdef __amigaos__ @@ -466,6 +467,11 @@ class CStdGadgetTree : public CStdGadget public: + int getContentID() + { + return m_contentID; + } + std::string getSelectedItem(); void setContent(int a_contentID);