X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROGUI%2FHYDROGUI_ChannelOp.cxx;h=38d16ae440520b49ededb060e2939842a09b3827;hb=f34b90e9e4e02ba65419134d5d37a2e42aecfabf;hp=4ccd4df478abdb9737beb6b43446b3d897a977e9;hpb=3f67da828864f8d27b0aea2828bc8f5c5aaa9808;p=modules%2Fhydro.git diff --git a/src/HYDROGUI/HYDROGUI_ChannelOp.cxx b/src/HYDROGUI/HYDROGUI_ChannelOp.cxx index 4ccd4df4..38d16ae4 100644 --- a/src/HYDROGUI/HYDROGUI_ChannelOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ChannelOp.cxx @@ -39,6 +39,7 @@ #include #include +#include HYDROGUI_ChannelOp::HYDROGUI_ChannelOp( HYDROGUI_Module* theModule, const bool theIsEdit ) @@ -87,7 +88,24 @@ void HYDROGUI_ChannelOp::startOperation() } // collect information about existing 3d polylines - QStringList aGuideLines = HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_POLYLINE ); + QStringList aGuideLines; + QStringList anAllGuideLines = HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_POLYLINE ); + foreach( QString aGuideLine, anAllGuideLines ) + { + Handle( HYDROData_Polyline3D ) aPolyline3d = + Handle( HYDROData_Polyline3D )::DownCast( + HYDROGUI_Tool::FindObjectByName( module(), aGuideLine, KIND_POLYLINE ) ); + if( !aPolyline3d.IsNull() ) + { + TopoDS_Shape aShape = aPolyline3d->GetShape3D(); + if( aShape.ShapeType()==TopAbs_WIRE ) + { + TopoDS_Wire aWire = TopoDS::Wire( aShape ); + if( !aWire.Closed() ) + aGuideLines.append( aGuideLine ); + } + } + } // collect information about existing profiles QStringList aProfiles = HYDROGUI_Tool::FindExistingObjectsNames( doc(), KIND_PROFILE ); @@ -129,7 +147,7 @@ HYDROGUI_InputPanel* HYDROGUI_ChannelOp::createInputPanel() const } bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags, - QString& theErrorMsg ) + QString& theErrorMsg ) { HYDROGUI_ChannelDlg* aPanel = ::qobject_cast( inputPanel() ); if ( !aPanel ) @@ -158,7 +176,8 @@ bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags, myEditedObject->SetName( anObjectName ); - if ( !myIsEdit ) { + if ( !myIsEdit ) + { myEditedObject->SetFillingColor( HYDROData_Channel::DefaultFillingColor() ); myEditedObject->SetBorderColor( HYDROData_Channel::DefaultBorderColor() ); } @@ -168,7 +187,9 @@ bool HYDROGUI_ChannelOp::processApply( int& theUpdateFlags, if( !myIsEdit ) module()->setObjectVisible( HYDROGUI_Tool::GetActiveOCCViewId( module() ), myEditedObject, true ); - theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced; + module()->setIsToUpdate( myEditedObject ); + + theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer; return true; } @@ -233,7 +254,7 @@ void HYDROGUI_ChannelOp::onCreatePreview( const bool theIsInit ) if ( !myViewManager || !myPreviewPrs ) return; - myPreviewPrs->update(); + myPreviewPrs->update( true, true ); } void HYDROGUI_ChannelOp::erasePreview()