#define CLEAR_OUTDATED_SELECTION_BEFORE_REDISPLAY
+//#define DEBUG_VIEWER_BLOCKED_COUNT
+
//**************************************************************
void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList)
{
else
myViewerBlockedRecursiveCount++;
+#ifdef DEBUG_VIEWER_BLOCKED_COUNT
+ std::cout << "myViewerBlockedRecursiveCount = " << myViewerBlockedRecursiveCount << std::endl;
+#endif
+
if (myNeedUpdate && isUpdateEnabled()) {
updateViewer();
myNeedUpdate = false;
void XGUI_Displayer::updateViewer() const
{
Handle(AIS_InteractiveContext) aContext = AISContext();
+
+#ifdef DEBUG_VIEWER_BLOCKED_COUNT
+ std::cout << "updateViewer: " << (myViewerBlockedRecursiveCount == 0 ? " done" : " later") << std::endl;
+#endif
+
if (!aContext.IsNull() && isUpdateEnabled()) {
//myWorkshop->viewer()->Zfitall();
aContext->UpdateCurrentViewer();
if (aOpMgr->canStopOperation(aOpMgr->currentOperation()))
aOpMgr->abortOperation(aOpMgr->currentOperation());
else
+ {
+ myDisplayer->enableUpdateViewer(isUpdateEnabled);
return;
+ }
}
objectBrowser()->treeView()->setCurrentIndex(QModelIndex());
std::list<std::string> anActionList = theActionType == ActionUndo ? aMgr->undoList()
updateCommandStatus();
// unblock the viewer update functionality and make update on purpose
- if (theActionType == ActionRedo) {
- myDisplayer->enableUpdateViewer(isUpdateEnabled);
- myDisplayer->updateViewer();
- }
+ myDisplayer->enableUpdateViewer(isUpdateEnabled);
+ myDisplayer->updateViewer();
}
//******************************************************