[Kst] 2 small issues

Barth Netterfield barth.netterfield at utoronto.ca
Tue Oct 29 21:11:30 UTC 2013


On October 26, 2013 11:51:21 AM Nicolas Brisset wrote:

> Hi Barth,
> 
> I have seen and tested your 2 commits for my 2 issues: they work fine,
> thanks a lot!
> 
> Regarding your comments wrt updates of the vector list, you're right with
> the vectorselector: the user won't notice so your solution is perfectly OK.
> For the flat list with all vectors visible (until you have too many...) it
> is more of an issue. My idea was not to update whenever a vector is added
> to the store, which happens behind the scenes and does not interest the
> user, but rather to trigger it when one or more vectors have been created
> from the datawizard or the create menu. Now, thinking a bit more about it I
> realize that filters and plugins also create vectors, so it's not just
> those 2 actions. Ideally, we would need to find the place to update the
> views at the end of any user-triggered action. I more or less thought it
> was the purpose of MainWindow::updateViewItems, but I may have been wrong.

This is for re-drawing viewItems (plots, labels, etc) when data objects have 
changed their contents.  We need a trigger when:
  -objects have been added or removed
  -objects have changed their names

Yesterday I tried to create a signal from the store, which is the only place 
that knows when vectors have been created or destroyed.  In doing this, I
discovered that vectors are created and added to the store before they are 
fully valid (eg, they may not yet know their names, or what file they are 
reading from...  So the even would cause a crash.  This would totally bite us 
if we ended up going multi-threaded.

In the meantime... I think that your approach, while kind of time consuming, 
is probably going to be the best.

So: I am making a 'updateServer' which will produce a signal when things need 
updating.  Dialogs will register changes with it whenever something changes.

cbn

-- 
C. Barth Netterfield
416-845-0946



More information about the Kst mailing list