From d6a1ee2d530580d2499ad41d007da37cd1f3c676 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Mon, 30 May 2011 19:15:33 +0200 Subject: [PATCH] Force visilibty of base image on first click of him or one of his children --- vv/vvMainWindow.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 8842b2d..c3465c1 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -1381,9 +1381,13 @@ void vvMainWindow::DisplayChanged(QTreeWidgetItem *clickedItem, int column) mSlicerManagers[slicerManagerIndex]->UpdateSlicer(column-1, true); mSlicerManagers[slicerManagerIndex]->UpdateInfoOnCursorPosition(column-1); DisplaySliders(slicerManagerIndex, column-1); - if(clickedParentItem == clickedItem) { - // Toggle or force visibility if it was not on this branch so far - vis = !draw || !vis; + if(!draw) { + // We were not on this branch so far => force visibility + vis = true; + } + else if(clickedParentItem == clickedItem) { + // Toggle + vis = !vis; } clickedSlicer->SetActorVisibility("image", 0, vis); clickedParentItem->setData(column, Qt::CheckStateRole, vis?2:0); -- 2.45.1