// check if bounding box was changed
if ( GetCurrentRenderer() )
{
+#ifdef VGL_WORKAROUND
+ GetCurrentRenderer()->Render();
+#endif
double aCurrBBCenter[3];
if ( ComputeBBCenter(GetCurrentRenderer(),aCurrBBCenter) )
{
#include <QMenu>
#include <QColorDialog>
#include <QToolBar>
+#include <QTimer>
#include <vtkCamera.h>
#include <vtkRenderer.h>
this, SLOT(onActorAdded(VTKViewer_Actor*)));
connect(aViewWindow, SIGNAL( actorRemoved(VTKViewer_Actor*) ),
this, SLOT(onActorRemoved(VTKViewer_Actor*)));
-
+
return aViewWindow;
}
connect(theViewManager, SIGNAL(mouseRelease(SUIT_ViewWindow*, QMouseEvent*)),
this, SLOT(onMouseRelease(SUIT_ViewWindow*, QMouseEvent*)));
+
+ connect(theViewManager, SIGNAL(viewCreated(SUIT_ViewWindow*)),
+ this, SLOT(onViewCreated(SUIT_ViewWindow*)));
}
/*!
{
emit actorRemoved((SVTK_ViewWindow*)sender(), theActor);
}
+
+void SVTK_Viewer::onViewCreated( SUIT_ViewWindow* view) {
+#ifdef VGL_WORKAROUND
+ if ( SVTK_ViewWindow* svw = dynamic_cast<SVTK_ViewWindow*>( view ) )
+ QTimer::singleShot(500, [svw] () { svw->Repaint(); } );
+#endif
+}
#include <QMenu>
#include <QToolBar>
+#include <QTimer>
#include <QEvent>
#include <QFileInfo>
#include <QSignalMapper>
GetInteractor()->update();
SVTK_InteractorStyle* aStyle = (SVTK_InteractorStyle*)getInteractor()->GetInteractorStyle();
- if ( aStyle )
+ if ( aStyle ) {
+#ifdef VGL_WORKAROUND
+ if ( aStyle->GetCurrentRenderer() == nullptr ) {
+ if( GetRenderer() ) {
+ aStyle->SetCurrentRenderer(GetRenderer()->GetDevice());
+ }
+ }
+#endif
aStyle->OnTimer();
+ }
}
/*!
blockSignals( blocked );
}
+
+void SVTK_ViewWindow::resizeEvent( QResizeEvent* theEvent )
+{
+#ifdef VGL_WORKAROUND
+ Repaint();
+#endif
+}
enum AnaglyphFilter { RedCyan, YellowBlue, GreenMagenta };
protected:
+
+ virtual void resizeEvent( QResizeEvent* );
+
virtual void Initialize(SVTK_View* theView,
SVTK_ViewModelBase* theModel);