if( anIndex>=0 && anIndex<myObjects.Length() )
return myObjects.Value( myObjects.Lower() + anIndex );
else
- Handle( HYDROData_Entity )();
+ return Handle( HYDROData_Entity )();
}
switch( GetMode() )
{
case ByPoint:
- return Handle( HYDROData_PolylineXY )::DownCast( myMainPolyline1->GetObject() );
+ if( !myMainPolyline1->GetObject().IsNull() )
+ return Handle( HYDROData_PolylineXY )::DownCast( myMainPolyline1->GetObject() );
case ByTool:
- return Handle( HYDROData_PolylineXY )::DownCast( myMainPolyline2->GetObject() );
+ if( !myMainPolyline2->GetObject().IsNull() )
+ return Handle( HYDROData_PolylineXY )::DownCast( myMainPolyline2->GetObject() );
default:
return Handle( HYDROData_PolylineXY )();
}
+ return Handle( HYDROData_PolylineXY )();
}
Handle( HYDROData_PolylineXY ) HYDROGUI_SplitPolylinesDlg::GetToolPolyline() const
{
gp_Pnt2d aPnt = aPanel->GetPoint();
TopoDS_Vertex aVertex = BRepLib_MakeVertex( gp_Pnt( aPnt.X(), aPnt.Y(), 0.0 ) );
- aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
+ if( !aPanel->GetMainPolyline().IsNull() )
+ aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
aBB.Add( aCmp, aVertex );
break;
}
case HYDROGUI_SplitPolylinesDlg::ByTool:
{
- aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
- aBB.Add( aCmp, aPanel->GetToolPolyline()->GetShape() );
+ if( !aPanel->GetMainPolyline().IsNull() )
+ aBB.Add( aCmp, aPanel->GetMainPolyline()->GetShape() );
+ if( !aPanel->GetToolPolyline().IsNull() )
+ aBB.Add( aCmp, aPanel->GetToolPolyline()->GetShape() );
break;
}
case HYDROGUI_SplitPolylinesDlg::Split:
</message>
</context>
+ <context>
+ <name>HYDROGUI_SplitPolylinesOp</name>
+ <message>
+ <source>SPLIT_POLYLINES</source>
+ <translation>Split polylines</translation>
+ </message>
+ </context>
+
<context>
<name>HYDROGUI_SplitPolylinesDlg</name>
<message>
</message>
</context>
+ <context>
+ <name>HYDROGUI_MergePolylinesOp</name>
+ <message>
+ <source>MERGE_POLYLINES</source>
+ <translation>Merge polylines</translation>
+ </message>
+ </context>
+
<context>
<name>HYDROGUI_ObjListBox</name>
<message>