From 7fe9456790bca18a1bde86a63ca4ee81936df597 Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Wed, 18 May 2011 16:24:30 +0200 Subject: [PATCH] Force cross redrawing after changes view mode - Add calls to NO and SO Slicers to redraw the cross. --- vv/vvMainWindow.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index acbb7d4..30ef801 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -1262,6 +1262,17 @@ void vvMainWindow::ChangeViewMode() DataTree->setColumnHidden(4,0); } UpdateRenderWindows(); + /* + ** I don't know why but for both resized QVTKWidget we also need to render + ** the associated Slicer to redraw crosses. + */ + for (unsigned int i = 0; i < mSlicerManagers.size(); i++) + { + if (DataTree->topLevelItem(i)->data(COLUMN_UL_VIEW,Qt::CheckStateRole).toInt() > 1) + mSlicerManagers[i]->GetSlicer(0)->Render(); + if (DataTree->topLevelItem(i)->data(COLUMN_DL_VIEW,Qt::CheckStateRole).toInt() > 1) + mSlicerManagers[i]->GetSlicer(2)->Render(); + } } //------------------------------------------------------------------------------ -- 2.47.1