Moved ClearModifiedStatus() to wxPropertyGridInterface

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2008-10-02 15:36:24 +00:00
parent d4cd6b3e0e
commit 89b4415803
3 changed files with 18 additions and 12 deletions

View File

@@ -293,13 +293,6 @@ public:
return InsertPage(-1, label, bmp, pageObj); return InsertPage(-1, label, bmp, pageObj);
} }
void ClearModifiedStatus ( wxPGPropArg id );
void ClearModifiedStatus ()
{
m_pPropGrid->ClearModifiedStatus();
}
/** Deletes all all properties and all pages. /** Deletes all all properties and all pages.
*/ */
virtual void Clear(); virtual void Clear();

View File

@@ -206,11 +206,7 @@ public:
/** Resets modified status of all properties. /** Resets modified status of all properties.
*/ */
void ClearModifiedStatus() void ClearModifiedStatus();
{
SetPropertyModifiedStatus(m_pState->m_properties, false);
m_pState->m_anyModified = false;
}
/** Collapses given category or property with children. /** Collapses given category or property with children.
Returns true if actually collapses. Returns true if actually collapses.

View File

@@ -475,6 +475,23 @@ void wxPropertyGridInterface::SetPropertyValueUnspecified( wxPGPropArg id )
p->GetParentState()->DoSetPropertyValueUnspecified(p); p->GetParentState()->DoSetPropertyValueUnspecified(p);
} }
// -----------------------------------------------------------------------
void wxPropertyGridInterface::ClearModifiedStatus()
{
unsigned int pageIndex = 0;
for (;;)
{
wxPropertyGridPageState* page = GetPageState(pageIndex);
if ( !page ) break;
page->DoGetRoot()->SetFlagRecursively(wxPG_PROP_MODIFIED, false);
pageIndex++;
}
}
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// wxPropertyGridInterface property value setting and getting // wxPropertyGridInterface property value setting and getting
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------