ENH: Add pauseRender() and resumeRender() functions to qMRMLLayoutManager
When modifying or setting up nodes that may trigger a render event, pauseRender can be called to temporarily stop the views from rendering intermediate steps. Once all modifications have been completed, calling resumeRender will restore the previously stored pause states.
Depends on https://github.com/commontk/CTK/pull/827
Edited by @jcfr:
To understand the motivation see https://github.com/commontk/CTK/pull/827#issue-213722434 and exchange between @finetjul and @lassoan copied from https://github.com/commontk/CTK/pull/827#issuecomment-419428173
From @finetjul : Please explain how different it is from renderEnabled.
From @lassoan Good point. There is a very important difference (rendering requests arriving while renderEnabled(false) makes rendering requests to be forgotten, while they are just delayed while rendering is paused) but it may not be obvious at first.
Another important advantage of pauseRender is that it can be called from high-level application code, where it is not clear if a certain change will eventually require re-rendering or not. When pauseRender is turned off, rendering will only be performed if it was requested while rendering was paused (in contrast, after renderEnabled(false) you must always re-render).
I think renderEnabled is mostly made obsolete by the new mechanism.
Cc: @ihnorton