lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [6006] Fix defect introduced 20141027T1211Z


From: Greg Chicares
Subject: [lmi-commits] [6006] Fix defect introduced 20141027T1211Z
Date: Tue, 28 Oct 2014 22:46:42 +0000

Revision: 6006
          http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6006
Author:   chicares
Date:     2014-10-28 22:46:42 +0000 (Tue, 28 Oct 2014)
Log Message:
-----------
Fix defect introduced 20141027T1211Z

Modified Paths:
--------------
    lmi/trunk/ChangeLog
    lmi/trunk/skeleton.cpp

Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-10-28 12:17:51 UTC (rev 6005)
+++ lmi/trunk/ChangeLog 2014-10-28 22:46:42 UTC (rev 6006)
@@ -34444,3 +34444,9 @@
 Skip tests for document types unsupported in context. See:
   http://lists.nongnu.org/archive/html/lmi/2014-10/msg00087.html
 
+20141028T2246Z <address@hidden> [531]
+
+  skeleton.cpp
+Fix defect introduced 20141027T1211Z. See:
+  http://lists.nongnu.org/archive/html/lmi/2014-10/msg00103.html
+

Modified: lmi/trunk/skeleton.cpp
===================================================================
--- lmi/trunk/skeleton.cpp      2014-10-28 12:17:51 UTC (rev 6005)
+++ lmi/trunk/skeleton.cpp      2014-10-28 22:46:42 UTC (rev 6006)
@@ -105,6 +105,7 @@
 #include <sstream>
 #include <stdexcept>
 #include <string>
+#include <vector>
 
 #if defined __WXGTK__
 #   include <gtk/gtk.h>
@@ -1312,10 +1313,6 @@
 
 // TODO ?? CALCULATION_SUMMARY It would probably be in much better
 // taste to use wxView::OnUpdate() for this purpose.
-
-// TODO ?? CALCULATION_SUMMARY The progress meter's count is wrong.
-// Consider writing a function to get a container of pointers to
-// children of a given type.
 //
 // TODO ?? CALCULATION_SUMMARY Instead, why not just update the
 // topmost window first, then update other windows, putting some
@@ -1323,13 +1320,8 @@
 
 void Skeleton::UpdateViews()
 {
+    std::vector<IllustrationView*> ivv;
     wxWindowList const& wl = frame_->GetChildren();
-    boost::shared_ptr<progress_meter> meter
-        (create_progress_meter
-            (wl.size()
-            ,"Updating calculation summaries"
-            )
-        );
     for(wxWindowList::const_iterator i = wl.begin(); i != wl.end(); ++i)
         {
         wxDocMDIChildFrame const* c = dynamic_cast<wxDocMDIChildFrame*>(*i);
@@ -1338,9 +1330,21 @@
             IllustrationView* v = 
dynamic_cast<IllustrationView*>(c->GetView());
             if(v)
                 {
-                v->DisplaySelectedValuesAsHtml();
+                ivv.push_back(v);
                 }
             }
+        }
+
+    boost::shared_ptr<progress_meter> meter
+        (create_progress_meter
+            (ivv.size()
+            ,"Updating calculation summaries"
+            )
+        );
+    typedef std::vector<IllustrationView*>::const_iterator vvci;
+    for(vvci i = ivv.begin(); i != ivv.end(); ++i)
+        {
+        (*i)->DisplaySelectedValuesAsHtml();
         if(!meter->reflect_progress())
             {
             break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]