if ( theSelectionButton == myShapeSelBtn ) {
myEditCurrentArgument = myShapeName;
anOtherButton = mySubShapeSelBtn;
+ // throw down current sub-shape selection
+ TopAbs_ShapeEnum aShapeType = TopAbs_SHAPE;
+
+ mySubShapeTypeCombo->setCurrentIndex( 0 );
+ mySubShapeName->setText( "" );
+
+ myAnnotationProperties.ShapeType = aShapeType;
+ myAnnotationProperties.ShapeIndex = -1;
+
+ mySelectionMode = aShapeType;
+
+ updateSubShapeEnableState();
} else if ( theSelectionButton == mySubShapeSelBtn ) {
myEditCurrentArgument = mySubShapeName;
anOtherButton = myShapeSelBtn;
if ( !myShapeNameModified ) {
myTextEdit->setText( aName );
onTextChange();
+ // modified state should not be changed as modification was performed not manually
+ myShapeNameModified = false;
}
}
//=================================================================================
void MeasureGUI_AnnotationDlg::updateSubShapeEnableState()
{
+ if ( !myIsCreation )
+ return;
+
bool isWholeShape = getShapeType() == TopAbs_SHAPE;
bool aNullShape = myShape->_is_nil();
mySubShapeSelBtn->setEnabled( !aNullShape && !isWholeShape );