mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 18:20:35 +05:00
ILMAB: field on geometry
1) Make components editable at field creation only 2) Reflect stamp change in step name in the OB
This commit is contained in:
parent
35d2444745
commit
843e3d4aa0
@ -374,11 +374,12 @@ EntityGUI_FieldDlg::StepTable::StepTable (int stepID, int dataType,
|
|||||||
// set edit triggers by default
|
// set edit triggers by default
|
||||||
setReadOnly( false );
|
setReadOnly( false );
|
||||||
|
|
||||||
|
if ( stepVar->_is_nil() )
|
||||||
|
{
|
||||||
connect( horizontalHeader(), SIGNAL( sectionDoubleClicked( int ) ), this, SLOT( headerDblClicked( int ) ) );
|
connect( horizontalHeader(), SIGNAL( sectionDoubleClicked( int ) ), this, SLOT( headerDblClicked( int ) ) );
|
||||||
|
|
||||||
if ( stepVar->_is_nil() )
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
myStamp = stepVar->GetStamp();
|
myStamp = stepVar->GetStamp();
|
||||||
|
|
||||||
const int nbColumns = nbComps + 1;
|
const int nbColumns = nbComps + 1;
|
||||||
@ -1310,7 +1311,6 @@ void EntityGUI_FieldDlg::onAddStep()
|
|||||||
//function : onRmStep
|
//function : onRmStep
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void EntityGUI_FieldDlg::onRmStep()
|
void EntityGUI_FieldDlg::onRmStep()
|
||||||
{
|
{
|
||||||
if ( myStepsCombo->count() > 1 )
|
if ( myStepsCombo->count() > 1 )
|
||||||
@ -1329,7 +1329,6 @@ void EntityGUI_FieldDlg::onRmStep()
|
|||||||
//function : onStampChange
|
//function : onStampChange
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void EntityGUI_FieldDlg::onStampChange()
|
void EntityGUI_FieldDlg::onStampChange()
|
||||||
{
|
{
|
||||||
if ( myCurStepTable )
|
if ( myCurStepTable )
|
||||||
@ -1340,7 +1339,6 @@ void EntityGUI_FieldDlg::onStampChange()
|
|||||||
//function : showCurStep
|
//function : showCurStep
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void EntityGUI_FieldDlg::showCurStep()
|
void EntityGUI_FieldDlg::showCurStep()
|
||||||
{
|
{
|
||||||
myCurStepID = getCurStepID();
|
myCurStepID = getCurStepID();
|
||||||
@ -1494,7 +1492,6 @@ TopAbs_ShapeEnum EntityGUI_FieldDlg::getShapeType(int* dim) const
|
|||||||
//function : getDim
|
//function : getDim
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
int EntityGUI_FieldDlg::getDim() const
|
int EntityGUI_FieldDlg::getDim() const
|
||||||
{
|
{
|
||||||
int i = myDimCombo->currentIndex();
|
int i = myDimCombo->currentIndex();
|
||||||
@ -1505,7 +1502,6 @@ int EntityGUI_FieldDlg::getDim() const
|
|||||||
//function : getDataType
|
//function : getDataType
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
int EntityGUI_FieldDlg::getDataType() const
|
int EntityGUI_FieldDlg::getDataType() const
|
||||||
{
|
{
|
||||||
return myTypeCombo->currentIndex();
|
return myTypeCombo->currentIndex();
|
||||||
@ -1515,7 +1511,6 @@ int EntityGUI_FieldDlg::getDataType() const
|
|||||||
//function : getCurStepID
|
//function : getCurStepID
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
int EntityGUI_FieldDlg::getCurStepID() const
|
int EntityGUI_FieldDlg::getCurStepID() const
|
||||||
{
|
{
|
||||||
if ( myStepsCombo->count() > 0 )
|
if ( myStepsCombo->count() > 0 )
|
||||||
@ -1527,7 +1522,6 @@ int EntityGUI_FieldDlg::getCurStepID() const
|
|||||||
//function : getNbComps
|
//function : getNbComps
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
int EntityGUI_FieldDlg::getNbComps() const
|
int EntityGUI_FieldDlg::getNbComps() const
|
||||||
{
|
{
|
||||||
return myNbCompsSpin->value();
|
return myNbCompsSpin->value();
|
||||||
@ -1567,7 +1561,6 @@ void EntityGUI_FieldDlg::updateShapeIDs()
|
|||||||
//function : updateDims
|
//function : updateDims
|
||||||
//purpose : update myDimCombo
|
//purpose : update myDimCombo
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
void EntityGUI_FieldDlg::updateDims(int curDim)
|
void EntityGUI_FieldDlg::updateDims(int curDim)
|
||||||
{
|
{
|
||||||
myDimCombo->blockSignals( true );
|
myDimCombo->blockSignals( true );
|
||||||
@ -1882,6 +1875,8 @@ bool EntityGUI_FieldDlg::execute()
|
|||||||
for ( ; i_tbl != myStepTables.end(); ++i_tbl )
|
for ( ; i_tbl != myStepTables.end(); ++i_tbl )
|
||||||
{
|
{
|
||||||
StepTable* tbl = i_tbl.value();
|
StepTable* tbl = i_tbl.value();
|
||||||
|
QString stepName = (tr("STEP")+" %1 %2").arg( tbl->getStepID() ).arg( tbl->getStamp() );
|
||||||
|
|
||||||
GEOM::GEOM_FieldStep_var step = tbl->getStep();
|
GEOM::GEOM_FieldStep_var step = tbl->getStep();
|
||||||
if ( step->_is_nil() )
|
if ( step->_is_nil() )
|
||||||
{
|
{
|
||||||
@ -1890,7 +1885,6 @@ bool EntityGUI_FieldDlg::execute()
|
|||||||
{
|
{
|
||||||
step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
|
step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
|
||||||
|
|
||||||
QString stepName = (tr("STEP")+" %1 %2").arg( tbl->getStepID() ).arg( tbl->getStamp() );
|
|
||||||
SALOMEDS::SObject_wrap aSO =
|
SALOMEDS::SObject_wrap aSO =
|
||||||
getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), myField );
|
getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), myField );
|
||||||
if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
|
if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
|
||||||
@ -1900,6 +1894,17 @@ bool EntityGUI_FieldDlg::execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( step->GetStamp() != tbl->getStamp() )
|
||||||
|
{
|
||||||
|
// update a stamp in the object browser
|
||||||
|
CORBA::String_var entry = step->GetStudyEntry();
|
||||||
|
if ( entry.in() ) {
|
||||||
|
SALOMEDS::SObject_wrap SO = aStudyDS->FindObjectID( entry.in() );
|
||||||
|
if ( !SO->_is_nil() )
|
||||||
|
aBuilder->SetName( SO, stepName.toLatin1().constData() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
tbl->setValues( step );
|
tbl->setValues( step );
|
||||||
|
|
||||||
// update the presentation if it is displayed
|
// update the presentation if it is displayed
|
||||||
|
Loading…
Reference in New Issue
Block a user