]> Creatis software - clitk.git/commitdiff
Force cross redrawing after changes view mode
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Wed, 18 May 2011 14:24:30 +0000 (16:24 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Wed, 18 May 2011 14:24:30 +0000 (16:24 +0200)
- Add calls to NO and SO Slicers to redraw the cross.

vv/vvMainWindow.cxx

index acbb7d4621a05f3fbf5c0ac240c6c1c1ee755917..30ef801a6460e5d7f399964ae00d4c706734f155 100644 (file)
@@ -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();
+  }
 }
 //------------------------------------------------------------------------------