From 60916506b4d67dc3a54c227e9776354ebbd650ba Mon Sep 17 00:00:00 2001 From: ouv Date: Thu, 14 Mar 2013 09:39:56 +0000 Subject: [PATCH] Porting to VTK 6. Debug. --- src/VISUGUI/VisuGUI_ClippingPanel.cxx | 15 +++++++++++++++ src/VISUGUI/VisuGUI_ClippingPanel.h | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.cxx b/src/VISUGUI/VisuGUI_ClippingPanel.cxx index 3de75240..c1edc6bd 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.cxx +++ b/src/VISUGUI/VisuGUI_ClippingPanel.cxx @@ -607,6 +607,8 @@ void VisuGUI_ClippingPanel::onNewPlane() myPlaneDlg = 0; setPlanesVisible(myShowPlanes->checkState() == Qt::Checked); + + updateAllPrsActors(); if (myViewWindow) myViewWindow->Repaint(); @@ -869,8 +871,11 @@ void VisuGUI_ClippingPanel::onCellChanged(int row, int col) bool isChecked = (myPlanesList->item(row, col)->checkState() == Qt::Checked); if (col == 1) { // activate column clicked if (isAutoApply()) + { //aPlane.plane->setActive(isChecked); aPlane->setActive(isChecked); + updateAllPrsActors(); + } else { myIsApplied = false; return; @@ -905,6 +910,7 @@ void VisuGUI_ClippingPanel::applyPlaneToPrs(int thePlaneNum, int thePrsNum, bool } else { // Detach aMgr.DetachClippingPlane(aPrs, thePlaneNum); } + aPrs->UpdateActors(); /* PlaneDef aPlane = myPlanes.at(thePlaneNum); _PTR(Study) aStudy = VISU::GetCStudy( VISU::GetAppStudy( myModule ) ); _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder(); @@ -1021,6 +1027,15 @@ VISU::Prs3d_i* VisuGUI_ClippingPanel::getPrs(QString theEntry) } +//************************************************************************* +void VisuGUI_ClippingPanel::updateAllPrsActors() +{ + for( int i = 0, n = myPresentations.size(); i < n; i++ ) + if( VISU::Prs3d_i* aPrs = getPrs( myPresentations.at( i ) ) ) + aPrs->UpdateActors(); +} + + //************************************************************************* void VisuGUI_ClippingPanel::onHelp() { diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.h b/src/VISUGUI/VisuGUI_ClippingPanel.h index 64ed6573..c4e9f95b 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.h +++ b/src/VISUGUI/VisuGUI_ClippingPanel.h @@ -167,6 +167,8 @@ private slots: QStringList getPrsList(_PTR(Study) theStudy, _PTR(SObject) theObject); VISU::Prs3d_i* getPrs(QString theEntry); + void updateAllPrsActors(); + QListWidget* myPrsList; QTableWidget* myPlanesList; -- 2.39.2