MPV: Merge V1.2d

This commit is contained in:
smh 2004-01-28 13:41:00 +00:00
parent 06f5ec7512
commit c73e967de5
3 changed files with 21 additions and 17 deletions

View File

@ -89,10 +89,10 @@ SMESHGUI_StudyAPI::SMESHGUI_StudyAPI ( SALOMEDS::Study_ptr aStudy,
// NRI : Temporary added
if ( myStudy->GetProperties()->IsLocked() ) {
QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(),
QObject::tr("WARNING"),
QObject::tr("WRN_STUDY_LOCKED"),
QObject::tr("BUT_OK") );
// QAD_MessageBox::warn1 ( (QWidget*)QAD_Application::getDesktop(),
// QObject::tr("WARNING"),
// QObject::tr("WRN_STUDY_LOCKED"),
// QObject::tr("BUT_OK") );
return;
}

View File

@ -91,6 +91,8 @@ void SMESH_Swig::Init(int studyID)
SALOMEDS::SComponent_var father = myStudy->FindComponent("MESH");
if (father->_is_nil()) {
bool aLocked = myStudy->GetProperties()->IsLocked();
if (aLocked) myStudy->GetProperties()->SetLocked(false);
father = myStudyBuilder->NewComponent("MESH");
anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributeName");
aName = SALOMEDS::AttributeName::_narrow(anAttr);
@ -99,10 +101,9 @@ void SMESH_Swig::Init(int studyID)
anAttr = myStudyBuilder->FindOrCreateAttribute(father, "AttributePixMap");
aPixmap = SALOMEDS::AttributePixMap::_narrow(anAttr);
aPixmap->SetPixMap( "ICON_OBJBROWSER_SMESH" );
myStudyBuilder->DefineComponentInstance(father, CompMesh );
if (aLocked) myStudy->GetProperties()->SetLocked(true);
}
myStudyBuilder->DefineComponentInstance(father, CompMesh );
mySComponentMesh = SALOMEDS::SComponent::_narrow( father );
// Tags definition
Tag_HypothesisRoot = 1;
Tag_AlgorithmsRoot = 2;

View File

@ -425,13 +425,13 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
SALOMEDS::ListOfFileNames_var aFileSeq = new SALOMEDS::ListOfFileNames;
aFileSeq->length(NUM_TMP_FILES);
TCollection_AsciiString aStudyName(SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL()));
TCollection_AsciiString aStudyName("");
// Set names of temporary files
TCollection_AsciiString filename = aStudyName + TCollection_AsciiString("SMESH.hdf");
TCollection_AsciiString hypofile = aStudyName + TCollection_AsciiString("SMESH_Hypo.txt");
TCollection_AsciiString algofile = aStudyName + TCollection_AsciiString("SMESH_Algo.txt");
TCollection_AsciiString meshfile = aStudyName + TCollection_AsciiString("SMESH_Mesh.med");
TCollection_AsciiString filename = aStudyName + TCollection_AsciiString("_SMESH.hdf");
TCollection_AsciiString hypofile = aStudyName + TCollection_AsciiString("_SMESH_Hypo.txt");
TCollection_AsciiString algofile = aStudyName + TCollection_AsciiString("_SMESH_Algo.txt");
TCollection_AsciiString meshfile = aStudyName + TCollection_AsciiString("_SMESH_Mesh.med");
aFileSeq[0] = CORBA::string_dup(filename.ToCString());
aFileSeq[1] = CORBA::string_dup(hypofile.ToCString());
aFileSeq[2] = CORBA::string_dup(algofile.ToCString());
@ -848,7 +848,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save(SALOMEDS::SComponent_ptr theComponent,
aStreamFile = SALOMEDS_Tool::PutFilesToStream(tmpDir.ToCString(), aFileSeq.in(), isMultiFile);
// Remove temporary files and directory
if (isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(tmpDir.ToCString(), aFileSeq.in(), true);
if (!isMultiFile) SALOMEDS_Tool::RemoveTemporaryFiles(tmpDir.ToCString(), aFileSeq.in(), true);
MESSAGE("End SMESH_Gen_i::Save");
@ -883,11 +883,14 @@ bool SMESH_Gen_i::Load(SALOMEDS::SComponent_ptr theComponent,
tmpDir.ToCString(),
isMultiFile);
TCollection_AsciiString aStudyName("");
if (isMultiFile) aStudyName = (SALOMEDS_Tool::GetNameFromPath(theComponent->GetStudy()->URL()));
// Set names of temporary files
TCollection_AsciiString filename = tmpDir + aFileSeq[0];//"SMESH.hdf";
TCollection_AsciiString hypofile = tmpDir + aFileSeq[1];//"SMESH_Hypo.txt";
TCollection_AsciiString algofile = tmpDir + aFileSeq[2];//"SMESH_Algo.txt";
TCollection_AsciiString meshfile = tmpDir + aFileSeq[3];//"SMESH_Mesh.med";
TCollection_AsciiString filename = tmpDir + aStudyName + TCollection_AsciiString("_SMESH.hdf");
TCollection_AsciiString hypofile = tmpDir + aStudyName + TCollection_AsciiString("_SMESH_Hypo.txt");
TCollection_AsciiString algofile = tmpDir + aStudyName + TCollection_AsciiString("_SMESH_Algo.txt");
TCollection_AsciiString meshfile = tmpDir + aStudyName + TCollection_AsciiString("_SMESH_Mesh.med");
SALOMEDS::Study_var Study = theComponent->GetStudy();
int studyId = Study->StudyId();