// set edit triggers by default
setReadOnly( false );
- connect( horizontalHeader(), SIGNAL( sectionDoubleClicked( int ) ), this, SLOT( headerDblClicked( int ) ) );
-
if ( stepVar->_is_nil() )
- return;
+ {
+ connect( horizontalHeader(), SIGNAL( sectionDoubleClicked( int ) ), this, SLOT( headerDblClicked( int ) ) );
+ return;
+ }
myStamp = stepVar->GetStamp();
const int nbColumns = nbComps + 1;
if ( section > 0 ) {
bool bOk;
QString label = QInputDialog::getText( this, EntityGUI_FieldDlg::tr( "RENAME_COMPONENT" ),
- EntityGUI_FieldDlg::tr ( "COMPONENT_NAME" ), QLineEdit::Normal,
- horizontalHeaderItem( section )->text(), &bOk );
+ EntityGUI_FieldDlg::tr ( "COMPONENT_NAME" ), QLineEdit::Normal,
+ horizontalHeaderItem( section )->text(), &bOk );
if ( bOk && !label.isEmpty() )
horizontalHeaderItem( section )->setText( label );
}
//function : onRmStep
//purpose :
//=======================================================================
-
void EntityGUI_FieldDlg::onRmStep()
{
if ( myStepsCombo->count() > 1 )
//function : onStampChange
//purpose :
//=======================================================================
-
void EntityGUI_FieldDlg::onStampChange()
{
if ( myCurStepTable )
//function : showCurStep
//purpose :
//=======================================================================
-
void EntityGUI_FieldDlg::showCurStep()
{
myCurStepID = getCurStepID();
//function : getDim
//purpose :
//=======================================================================
-
int EntityGUI_FieldDlg::getDim() const
{
int i = myDimCombo->currentIndex();
//function : getDataType
//purpose :
//=======================================================================
-
int EntityGUI_FieldDlg::getDataType() const
{
return myTypeCombo->currentIndex();
//function : getCurStepID
//purpose :
//=======================================================================
-
int EntityGUI_FieldDlg::getCurStepID() const
{
if ( myStepsCombo->count() > 0 )
//function : getNbComps
//purpose :
//=======================================================================
-
int EntityGUI_FieldDlg::getNbComps() const
{
return myNbCompsSpin->value();
//function : updateDims
//purpose : update myDimCombo
//=======================================================================
-
void EntityGUI_FieldDlg::updateDims(int curDim)
{
myDimCombo->blockSignals( true );
for ( ; i_tbl != myStepTables.end(); ++i_tbl )
{
StepTable* tbl = i_tbl.value();
+ QString stepName = (tr("STEP")+" %1 %2").arg( tbl->getStepID() ).arg( tbl->getStamp() );
+
GEOM::GEOM_FieldStep_var step = tbl->getStep();
if ( step->_is_nil() )
{
{
step = myField->AddStep( tbl->getStepID(), tbl->getStamp() );
- QString stepName = (tr("STEP")+" %1 %2").arg( tbl->getStepID() ).arg( tbl->getStamp() );
SALOMEDS::SObject_wrap aSO =
getGeomEngine()->AddInStudy( aStudyDS, step, stepName.toLatin1().constData(), myField );
if ( /*!myIsCreation &&*/ !aSO->_is_nil() ) {
}
}
}
+ 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 );
// update the presentation if it is displayed