]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved ClearModifiedStatus() to wxPropertyGridInterface
authorJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 2 Oct 2008 15:36:24 +0000 (15:36 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Thu, 2 Oct 2008 15:36:24 +0000 (15:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/manager.h
include/wx/propgrid/propgridiface.h
src/propgrid/propgridiface.cpp

index 3e1419f49f48df7be3a0eebf74427040206d2f71..242ff70cdb41af3f5e5fba4a78e75410c88ea73c 100644 (file)
@@ -293,13 +293,6 @@ public:
         return InsertPage(-1, label, bmp, pageObj);
     }
 
-    void ClearModifiedStatus ( wxPGPropArg id );
-
-    void ClearModifiedStatus ()
-    {
-        m_pPropGrid->ClearModifiedStatus();
-    }
-
     /** Deletes all all properties and all pages.
     */
     virtual void Clear();
index dbf135439528d9e6f008fa96eb354d6661be10ab..64e79945288e6782366335ba5596c35cb901484a 100644 (file)
@@ -206,11 +206,7 @@ public:
 
     /** Resets modified status of all properties.
     */
-    void ClearModifiedStatus()
-    {
-        SetPropertyModifiedStatus(m_pState->m_properties, false);
-        m_pState->m_anyModified = false;
-    }
+    void ClearModifiedStatus();
 
     /** Collapses given category or property with children.
         Returns true if actually collapses.
index 96fe84fdbb4cbcd8a42fc77a426c4609fba44fb6..c5cfb5af4409a16d9ea973f882dcfef03aa7ca3a 100644 (file)
@@ -475,6 +475,23 @@ void wxPropertyGridInterface::SetPropertyValueUnspecified( wxPGPropArg id )
         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
 // -----------------------------------------------------------------------