X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvMainWindow.cxx;h=882e8f121402576e49d4fb52e6df56333dbae0c4;hb=80584ca39a63110a46cf5a0b1498ba262146cc9a;hp=acbb7d4621a05f3fbf5c0ac240c6c1c1ee755917;hpb=8eaf0a647fec2440abf6064d78d3eab735aa90c6;p=clitk.git diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index acbb7d4..882e8f1 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -318,6 +318,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() // Adding all new tools (insertion in the menu) vvToolManager::GetInstance()->InsertToolsInMenu(this); + vvToolManager::GetInstance()->EnableToolsInMenu(this, false); if (!CLITK_EXPERIMENTAL) menuExperimental->menuAction()->setVisible(false); @@ -329,7 +330,6 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() timerMemory->start(2000); } //------------------------------------------------------------------------------ - void vvMainWindow::show(){ vvMainWindowBase::show(); PopupRegisterForm(true); @@ -1018,6 +1018,7 @@ void vvMainWindow::ImageInfoChanged() actionNorth_West_Window->setEnabled(1); actionSouth_East_Window->setEnabled(1); actionSouth_West_Window->setEnabled(1); + vvToolManager::GetInstance()->EnableToolsInMenu(this, true); inverseButton->setEnabled(1); goToCursorPushButton->setEnabled(1); @@ -1262,6 +1263,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(); + } } //------------------------------------------------------------------------------