Update of /cvsroot/simspark/simspark/contrib/rsgedit
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15476
Modified Files:
Tag: WIN32
mainframe.cpp mainframe.h
Log Message:
- added UpdateCached() that updates the cached references in Spark and all property windows
Index: mainframe.h
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.h,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.5
diff -C2 -d -r1.7.2.4 -r1.7.2.5
*** mainframe.h 16 Feb 2007 17:06:41 -0000 1.7.2.4
--- mainframe.h 18 Feb 2007 08:53:31 -0000 1.7.2.5
***************
*** 130,133 ****
--- 130,137 ----
void RefreshProperties();
+ /** updated any cached references */
+ void UpdateCached();
+
+
protected:
// begin wxGlade: mainframe::attributes
Index: mainframe.cpp
===================================================================
RCS file: /cvsroot/simspark/simspark/contrib/rsgedit/mainframe.cpp,v
retrieving revision 1.8.2.5
retrieving revision 1.8.2.6
diff -C2 -d -r1.8.2.5 -r1.8.2.6
*** mainframe.cpp 18 Feb 2007 08:07:37 -0000 1.8.2.5
--- mainframe.cpp 18 Feb 2007 08:53:31 -0000 1.8.2.6
***************
*** 525,528 ****
--- 525,555 ----
}
+ void mainframe::UpdateCached()
+ {
+ shared_ptr<SimSpark> spark = wxGetApp().GetSpark();
+ if (spark.get() == 0)
+ {
+ return;
+ }
+
+ spark->UpdateCached();
+
+ wxWindowList& children = GetChildren();
+ for (
+ wxWindowList::Node *node = children.GetFirst();
+ node != 0;
+ node = node->GetNext()
+ )
+ {
+ propertyframe* pf = dynamic_cast<propertyframe*>(node->GetData());
+ if (pf == 0)
+ {
+ continue;
+ }
+
+ pf->UpdateCached();
+ }
+ }
+
void mainframe::OnUpdateViewTree(wxUpdateUIEvent& event)
{
***************
*** 583,587 ****
}
! spark->UpdateCached();
shared_ptr<SimulationServer> sim = spark->GetSimulationServer();
--- 610,614 ----
}
! UpdateCached();
shared_ptr<SimulationServer> sim = spark->GetSimulationServer();
|