From: ouv Date: Thu, 14 Mar 2013 09:39:56 +0000 (+0000) Subject: Porting to VTK 6. X-Git-Tag: before_mergefrom_V6_main_15Mar13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=60916506b4d67dc3a54c227e9776354ebbd650ba;p=modules%2Fvisu.git Porting to VTK 6. Debug. --- 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;