mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-11-11 16:19:17 +05:00
Fix error with wrong entity type when editing field created on a whole shape
This commit is contained in:
parent
86fac89ec3
commit
2a044ae940
@ -1181,7 +1181,7 @@ void EntityGUI_FieldDlg::SelectionIntoArgument()
|
|||||||
|
|
||||||
// re-fill myDimCombo
|
// re-fill myDimCombo
|
||||||
//const int curDim = getDim();
|
//const int curDim = getDim();
|
||||||
updateDims( -1 );
|
updateDims( -100 );
|
||||||
|
|
||||||
// update table
|
// update table
|
||||||
onDimChange();
|
onDimChange();
|
||||||
@ -1607,14 +1607,14 @@ void EntityGUI_FieldDlg::updateDims(int curDim)
|
|||||||
{
|
{
|
||||||
exp.Init( aShape, getShapeType(&dim));
|
exp.Init( aShape, getShapeType(&dim));
|
||||||
if ( exp.More() && !aShape.IsSame( exp.Current() ))
|
if ( exp.More() && !aShape.IsSame( exp.Current() ))
|
||||||
{
|
|
||||||
myDimCombo->insertItem( dim, tr( subNames[dim] ), dim );
|
myDimCombo->insertItem( dim, tr( subNames[dim] ), dim );
|
||||||
if ( dim == curDim ) // restore current dim
|
|
||||||
myDimCombo->setCurrentIndex( myDimCombo->count()-1 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
myDimCombo->insertItem( 4, tr("WHOLE"), -1 );
|
myDimCombo->insertItem( 4, tr("WHOLE"), -1 );
|
||||||
if ( getDim() != curDim )
|
|
||||||
|
int idx = myDimCombo->findData( curDim );
|
||||||
|
if ( idx != -1 )
|
||||||
|
myDimCombo->setCurrentIndex( idx );
|
||||||
|
else
|
||||||
myDimCombo->setCurrentIndex( myDimCombo->count()-1-(myDimCombo->count()>1?1:0) );
|
myDimCombo->setCurrentIndex( myDimCombo->count()-1-(myDimCombo->count()>1?1:0) );
|
||||||
}
|
}
|
||||||
myDimCombo->blockSignals( false );
|
myDimCombo->blockSignals( false );
|
||||||
|
Loading…
Reference in New Issue
Block a user