aPanel->reset();
if ( myInitialMode == All ) {
- //@MZN aPanel->setMode( anAllMode );
onModeActivated( HYDROGUI_GeoreferencementDlg::AllProfiles );
} else if ( myInitialMode == Selected ) {
- //@MZN aPanel->setMode( aSelectionMode );
onModeActivated( HYDROGUI_GeoreferencementDlg::SelectedProfiles );
}
Handle(HYDROData_Profile) aProfile =
Handle(HYDROData_Profile)::DownCast( myObject );
+ TopoDS_Wire aProfileWire;
+
if ( aProfile->IsValid() ) {
TopoDS_Shape aProfileShape = aProfile->GetShape3D();
- if ( !aProfileShape.IsNull() ) {
- if ( aProfileShape.ShapeType() == TopAbs_WIRE ) {
- TopoDS_Wire aProfileWire = TopoDS::Wire( aProfileShape );
- setWire( aProfileWire, false, false );
- } else {
- myTopoShape = aProfileShape;
- myDisplayMode = AIS_WireFrame;
-
- buildShape();
- updateShape( false, false );
- }
+ if ( !aProfileShape.IsNull() &&
+ aProfileShape.ShapeType() == TopAbs_WIRE ) {
+ aProfileWire = TopoDS::Wire( aProfileShape );
}
}
+
+ setWire( aProfileWire, false, false );
}
}
// Erase previously created shape
erase();
- if ( myTopoShape.IsNull() )
+ if ( myTopoShape.IsNull() ) {
+ myShape.Nullify();
return;
+ }
QString aTextureFileName = getTextureFileName();
bool anIsTexture = !aTextureFileName.isEmpty();