Question about updating in a GUI

  • Thread starter Gheorghe Postelnicu
  • Start date
G

Gheorghe Postelnicu

Hi,

I have a GUI which does some visualization based on VTK and Tkinter.

The problem I have is kinda complicated to describe, but here is a
sketch of it: I have a basic Observer pattern in place for events
(such as the change current 2D slice visualized) and it generally
works well.

However, I just tried inserting a new mode in my GUI, which triggers
an update in the above interface. In general, modes react to these
event changes by refreshing the data, so the code is really
straightforward. However, for this specific mode, I need some
persistent data. So I need to tell my Callback to keep the data and
not refresh it, as is usually the case.

I tried to set a flag that would be set during this operation (my
application is not multi-threaded and I took a chance), but the
updates in the renderer in VTK are not synchronous, so the flag gets
cleared before all the updates occured, so my data still gets flushed
away.

Any suggestions on how I should be approaching this?

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top