X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_GroupDlg.cxx;h=36534f31ad8da3093cd5d62c3065f7f3c60e9dfe;hp=ce7f8b88af92956310cc239b856e2920d0f1cefa;hb=35012b0a3d7a04ff4af9f1622340a814b3f1300b;hpb=d5029840731bccaa1718e65f0abf3b19198c7293 diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index ce7f8b88a..36534f31a 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -192,7 +192,7 @@ void SMESHGUI_GroupDlg::initDialog( bool create) QPixmap image0( SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap( "SMESH", tr( "ICON_SELECT" ) ) ); setWindowTitle( create ? tr( "SMESH_CREATE_GROUP_TITLE" ) : tr( "SMESH_EDIT_GROUP_TITLE" ) ); - myHelpFileName = create ? "creating_groups_page.html" : "editing_groups_page.html"; + myHelpFileName = create ? "creating_groups.html" : "editing_groups.html"; setSizeGripEnabled( true); @@ -516,7 +516,7 @@ QString SMESHGUI_GroupDlg::GetDefaultName(const QString& theOperation) bool isUnique = false; while (!isUnique) { aName = theOperation + "_" + QString::number(++aNumber); - isUnique = (aSet.count(std::string(SMESH::toUtf8(aName))) == 0); + isUnique = (aSet.count(std::string(aName.toUtf8().constData())) == 0); } return aName; @@ -531,7 +531,7 @@ void SMESHGUI_GroupDlg::setDefaultName() const do { aResName = aPrefix + QString::number( i++ ); - anObj = SMESH::getStudy()->FindObject( SMESH::toUtf8(aResName) ); + anObj = SMESH::getStudy()->FindObject( aResName.toUtf8().constData() ); } while ( anObj ); myName->setText(aResName); @@ -597,7 +597,7 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup, SALOMEDS::Color aColor = theGroup->GetColor(); setGroupColor( aColor ); - myMeshGroupLine->setText(SMESH::fromUtf8(theGroup->GetName())); + myMeshGroupLine->setText(theGroup->GetName()); int aType = 0; switch(theGroup->GetType()) { @@ -684,7 +684,7 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup, { myNameChanged = true; myName->blockSignals(true); - myName->setText(SMESH::fromUtf8(theGroup->GetName())); + myName->setText(theGroup->GetName()); myName->blockSignals(false); } @@ -1050,7 +1050,7 @@ bool SMESHGUI_GroupDlg::onApply() if (myGeomObjects->length() == 1) { myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType, - SMESH::toUtf8(myName->text()), + myName->text().toUtf8(), myGeomObjects[0]); } else { @@ -1091,11 +1091,11 @@ bool SMESHGUI_GroupDlg::onApply() aNewGeomGroupName += myName->text(); SALOMEDS::SObject_var aNewGroupSO = geomGen->AddInStudy(aGroupVar, - SMESH::toUtf8(aNewGeomGroupName), aMeshShape); + aNewGeomGroupName.toUtf8(), aMeshShape); } myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType, - SMESH::toUtf8(myName->text()), + myName->text().toUtf8(), aGroupVar); } resultGroup = SMESH::SMESH_GroupBase::_narrow( myGroupOnGeom ); @@ -1113,14 +1113,14 @@ bool SMESHGUI_GroupDlg::onApply() { if ( myFilter->_is_nil() ) return false; - if (CORBA::is_nil(myGroupOnFilter)) { // creation + if (CORBA::is_nil(myGroupOnFilter)) // creation + { if (myMesh->_is_nil()) return false; myGroupOnFilter = myMesh->CreateGroupFromFilter(aType, - SMESH::toUtf8(myName->text()), + myName->text().toUtf8(), myFilter); - resultGroup = SMESH::SMESH_GroupBase::_narrow( myGroupOnFilter ); isCreation = true; } @@ -1134,7 +1134,7 @@ bool SMESHGUI_GroupDlg::onApply() anIsOk = true; } - if( anIsOk ) + if ( anIsOk ) { SALOMEDS::Color aColor = getGroupColor(); resultGroup->SetColor(aColor); @@ -1143,7 +1143,7 @@ bool SMESHGUI_GroupDlg::onApply() if( aMeshGroupSO ) anEntryList.append( aMeshGroupSO->GetID().c_str() ); - resultGroup->SetName(SMESH::toUtf8(myName->text().trimmed())); + resultGroup->SetName(myName->text().trimmed().toUtf8()); if ( isCreation ) { @@ -1174,7 +1174,7 @@ bool SMESHGUI_GroupDlg::onApply() if ( !anActor ) return false; myActorsList.append( anActor ); } - anActor->setName(SMESH::toUtf8(myName->text())); + anActor->setName(myName->text().toUtf8()); QColor c; int delta; switch ( myTypeId ) { @@ -1192,7 +1192,7 @@ bool SMESHGUI_GroupDlg::onApply() anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B, delta ); break; break; } - // update a visible group accoding to a changed contents + // update a visible group according to a changed contents if ( !isConversion && anActor->GetVisibility() ) { SMESH::Update( anIO, true ); @@ -1420,8 +1420,9 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged() aGroupMainShape = aGeomGroup; aGroupMainShape->Register(); } + CORBA::String_var entry = aGroupMainShape->GetStudyEntry(); _PTR(SObject) aGroupMainShapeSO = - SMESH::getStudy()->FindObjectID(aGroupMainShape->GetStudyEntry()); + SMESH::getStudy()->FindObjectID( entry.in() ); _PTR(SObject) anObj, aRef; bool isRefOrSubShape = false; @@ -1445,10 +1446,10 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged() myGeomObjects->length(i); if ( i == 0 ) - { - myIsBusy = false; - return; - } + { + myIsBusy = false; + return; + } aNbSel = i; } @@ -2303,7 +2304,7 @@ void SMESHGUI_GroupDlg::onHelp() //================================================================================= // function : SMESHGUI_GroupDlg::onDeactivate -// purpose : SLOT called when dialog must be deativated +// purpose : SLOT called when dialog must be deactivated //================================================================================= void SMESHGUI_GroupDlg::onDeactivate() {