mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-15 13:23:08 +05:00
minor corrections in annotation dialog: 1. Sub-shape selection should be cleared by new shape selection; 2. in edit mode sub-shape should be always disabled.
This commit is contained in:
parent
a2a6f8464c
commit
b73e272eee
@ -450,6 +450,18 @@ void MeasureGUI_AnnotationDlg::activateSelectionArgument
|
|||||||
if ( theSelectionButton == myShapeSelBtn ) {
|
if ( theSelectionButton == myShapeSelBtn ) {
|
||||||
myEditCurrentArgument = myShapeName;
|
myEditCurrentArgument = myShapeName;
|
||||||
anOtherButton = mySubShapeSelBtn;
|
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 ) {
|
} else if ( theSelectionButton == mySubShapeSelBtn ) {
|
||||||
myEditCurrentArgument = mySubShapeName;
|
myEditCurrentArgument = mySubShapeName;
|
||||||
anOtherButton = myShapeSelBtn;
|
anOtherButton = myShapeSelBtn;
|
||||||
@ -489,6 +501,8 @@ void MeasureGUI_AnnotationDlg::SelectionIntoArgument()
|
|||||||
if ( !myShapeNameModified ) {
|
if ( !myShapeNameModified ) {
|
||||||
myTextEdit->setText( aName );
|
myTextEdit->setText( aName );
|
||||||
onTextChange();
|
onTextChange();
|
||||||
|
// modified state should not be changed as modification was performed not manually
|
||||||
|
myShapeNameModified = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -816,6 +830,9 @@ SALOME_Prs* MeasureGUI_AnnotationDlg::buildPrs()
|
|||||||
//=================================================================================
|
//=================================================================================
|
||||||
void MeasureGUI_AnnotationDlg::updateSubShapeEnableState()
|
void MeasureGUI_AnnotationDlg::updateSubShapeEnableState()
|
||||||
{
|
{
|
||||||
|
if ( !myIsCreation )
|
||||||
|
return;
|
||||||
|
|
||||||
bool isWholeShape = getShapeType() == TopAbs_SHAPE;
|
bool isWholeShape = getShapeType() == TopAbs_SHAPE;
|
||||||
bool aNullShape = myShape->_is_nil();
|
bool aNullShape = myShape->_is_nil();
|
||||||
mySubShapeSelBtn->setEnabled( !aNullShape && !isWholeShape );
|
mySubShapeSelBtn->setEnabled( !aNullShape && !isWholeShape );
|
||||||
|
Loading…
Reference in New Issue
Block a user