Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the content ID of the item list in use #79

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion StdGadgetTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -282,7 +284,9 @@ int CStdGadgetTree::setContent(StdList<CTreeNode> &a_items)

#endif /* ! QT_GUI_LIB */

return m_nextContentID++;
m_contentID = m_nextContentID++;

return m_contentID;
}

/**
Expand Down
6 changes: 6 additions & 0 deletions StdGadgets.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -466,6 +467,11 @@ class CStdGadgetTree : public CStdGadget

public:

int getContentID()
{
return m_contentID;
}

std::string getSelectedItem();

void setContent(int a_contentID);
Expand Down
Loading