lmi
[Top][All Lists]
Advanced

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

[lmi] Census-manager Update()


From: Greg Chicares
Subject: [lmi] Census-manager Update()
Date: Sat, 01 Nov 2014 22:05:38 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

For a given column in the census manager, suppose that all cells
have the same value, except for one differing cell. If we edit
that differing cell and remove that difference, then all cells
are now the same, and the column is no longer to be shown. When
is the display to be thus updated? IOW, when should the function
that updates the display, CensusView::Update(), be called?

It is called whenever
 - a cell is added or deleted; or
 - a census is pasted; or
 - any change is made through the tabbed "Edit" dialog.
But it is not called when a value is changed through direct
drill-down editing; should it be? I tried this experiment:

-- 8< --
Index: census_view.cpp
===================================================================
--- census_view.cpp     (revision 6015)
+++ census_view.cpp     (working copy)
@@ -748,6 +748,7 @@
     Input& model = view_.cell_parms()[row];
     model.Reconcile();

+    view_.Update();
     view_.document().Modify(true);

     return true;
-- >8 --

and concluded that we're better off without that change. It's good
for a small census, but for a census with 4000 cells it made the GUI
feel sluggish. (Maybe someday we'll be able to update only the part
that shows on the screen--like a "virtual" wxGrid, IIRC).

But there has to be a way to trigger Update() aside from the
triggers documented above, so I asked myself what a reasonably
ingenious user would try. The answer seemed obvious:
  http://svn.savannah.nongnu.org/viewvc?view=rev&root=lmi&revision=6016




reply via email to

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