From: Vivien Delmon Date: Wed, 18 May 2011 14:24:30 +0000 (+0200) Subject: Force cross redrawing after changes view mode X-Git-Tag: v1.2.1~16^2~1 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=7fe9456790bca18a1bde86a63ca4ee81936df597;p=clitk.git Force cross redrawing after changes view mode - Add calls to NO and SO Slicers to redraw the cross. --- 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(); + } } //------------------------------------------------------------------------------