From: vsr Date: Mon, 21 Mar 2011 13:38:38 +0000 (+0000) Subject: Merge from BR_WIN_INDUS_514 branch 21/03/2011 (Windows industrialization) X-Git-Tag: V6_3_0a1~22 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c9a662d666a6584c01566554b05dfd252e2eaee4;p=modules%2Fgui.git Merge from BR_WIN_INDUS_514 branch 21/03/2011 (Windows industrialization) --- diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index d9672e122..e04d6f09f 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -142,17 +142,20 @@ void LightApp_ShowHideOp::startOperation() else entries.append( entry ); } - + // be sure to use real obejct entries QStringList objEntries; QStringList::const_iterator it = entries.begin(), last = entries.end(); for ( ; it!=last; ++it ) objEntries.append( study->referencedToEntry( *it ) ); - if( myActionType==DISPLAY || myActionType==DISPLAY_ONLY ) + if( myActionType==DISPLAY || myActionType==DISPLAY_ONLY ) { d->Display( objEntries, false, 0 ); - else if( myActionType==ERASE ) + mgr->setSelectedObjects(selObjs); + } + else if( myActionType==ERASE ) { d->Erase( objEntries, false, false, 0 ); + } d->UpdateViewer(); commit(); diff --git a/src/SVTK/SALOME_Actor.cxx b/src/SVTK/SALOME_Actor.cxx index 13b2a0224..fc102935b 100644 --- a/src/SVTK/SALOME_Actor.cxx +++ b/src/SVTK/SALOME_Actor.cxx @@ -459,7 +459,8 @@ SALOME_Actor ::highlight(bool theIsHighlight) { vtkFloatingPointType aBounds[6]; - GetInput()->GetBounds(aBounds); + vtkDataSet * aDataSet = GetHighlightedDataSet(); + aDataSet->GetBounds(aBounds); myOutline->SetBounds(aBounds); myOutlineActor->SetVisibility( GetVisibility() && theIsHighlight ); diff --git a/src/SVTK/SVTK_Recorder.cxx b/src/SVTK/SVTK_Recorder.cxx index 2b4758590..e7be327b7 100755 --- a/src/SVTK/SVTK_Recorder.cxx +++ b/src/SVTK/SVTK_Recorder.cxx @@ -116,7 +116,11 @@ SVTK_Recorder myErrorStatus = 0; using namespace std; ostringstream aStream; +#ifndef WIN32 aStream<<"which "< /dev/null"; +#else + aStream<<"setlocal & set P2=.;%PATH% & (for %e in (%PATHEXT%) do @for %i in ("< NUL"; + #endif if(anIndex + 1 < aFinishIndex) + #ifndef WIN32 aStream<<" \\"; - aStream< " + tmpFile + + ") & (for /f %i in (" + tmpFile + ") do (del \"%i\")) & (del " + tmpFile + "))) > NUL"; +#endif if(MYDEBUG) cout<<"SVTK_Recorder::MakeFileAVI - "<<(const char*)aCommand.toLatin1()<GetQuadraticArcAngle(); } +/*! + * Return pointer to the dataset, which used to calculation of the bounding box of the actor. + * By default it is the input dataset. + */ +vtkDataSet* VTKViewer_Actor::GetHighlightedDataSet() { + return GetInput(); +} diff --git a/src/VTKViewer/VTKViewer_Actor.h b/src/VTKViewer/VTKViewer_Actor.h index af13d6c96..58e1d9f68 100755 --- a/src/VTKViewer/VTKViewer_Actor.h +++ b/src/VTKViewer/VTKViewer_Actor.h @@ -315,6 +315,9 @@ class VTKVIEWER_EXPORT VTKViewer_Actor : public vtkLODActor virtual void SetQuadraticArcAngle(vtkFloatingPointType theMaxAngle); virtual vtkFloatingPointType GetQuadraticArcAngle() const; + //---------------------------------------------------------------------------- + //! Return pointer to the dataset, which used to calculation of the bounding box of the actor + virtual vtkDataSet* GetHighlightedDataSet(); protected: //---------------------------------------------------------------------------- diff --git a/src/VTKViewer/VTKViewer_ConvexTool.cxx b/src/VTKViewer/VTKViewer_ConvexTool.cxx index ce1327a86..115335c5c 100644 --- a/src/VTKViewer/VTKViewer_ConvexTool.cxx +++ b/src/VTKViewer/VTKViewer_ConvexTool.cxx @@ -623,14 +623,17 @@ VTKViewer_OrderedTriangulator vtkFloatingPointType aBounds[6]; myPoints->GetBounds(aBounds); - + vtkFloatingPointType xSize, ySize, zSize; + xSize = aBounds[1] - aBounds[0]; + ySize = aBounds[3] - aBounds[2]; + zSize = aBounds[5] - aBounds[4]; vtkFloatingPointType anAbsoluteCoord[3]; vtkFloatingPointType aParamentrucCoord[3]; for (int aPntId = 0; aPntId < aNumPts; aPntId++) { myPoints->GetPoint(aPntId, anAbsoluteCoord); - aParamentrucCoord[0] = (anAbsoluteCoord[0] - aBounds[0]) / (aBounds[1] - aBounds[0]); - aParamentrucCoord[1] = (anAbsoluteCoord[1] - aBounds[2]) / (aBounds[3] - aBounds[2]); - aParamentrucCoord[2] = (anAbsoluteCoord[2] - aBounds[4]) / (aBounds[5] - aBounds[4]); + aParamentrucCoord[0] = xSize==0. ? 0. : ((anAbsoluteCoord[0] - aBounds[0]) / xSize); + aParamentrucCoord[1] = ySize==0. ? 0. : ((anAbsoluteCoord[1] - aBounds[2]) / ySize); + aParamentrucCoord[2] = zSize==0. ? 0. : ((anAbsoluteCoord[2] - aBounds[4]) / zSize); myTriangulator->InsertPoint(aPntId, anAbsoluteCoord, aParamentrucCoord, 0); }