From: vsr Date: Thu, 13 Dec 2012 12:04:49 +0000 (+0000) Subject: Merge from V6_main 13/12/2012 X-Git-Tag: V7_1_0_pre X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b76e093cfa8db038388842cd5dd3279ada01f213;p=modules%2Fvisu.git Merge from V6_main 13/12/2012 --- diff --git a/src/CONVERTOR/Makefile.am b/src/CONVERTOR/Makefile.am index 105565a7..d10fed3e 100644 --- a/src/CONVERTOR/Makefile.am +++ b/src/CONVERTOR/Makefile.am @@ -89,7 +89,7 @@ libVisuConvertor_la_CPPFLAGS= \ libVisuConvertor_la_LDFLAGS= \ - $(MED3_LIBS) \ + $(MED3_LIBS_C_ONLY) \ $(BOOST_LIB_THREAD) \ $(BOOST_LIB_DATE_TIME) \ $(VTK_LIBS) \ diff --git a/src/ENGINE/VISU_Engine_i.cc b/src/ENGINE/VISU_Engine_i.cc index 7c7d8c67..d8027799 100644 --- a/src/ENGINE/VISU_Engine_i.cc +++ b/src/ENGINE/VISU_Engine_i.cc @@ -561,4 +561,10 @@ namespace VISU{ { return myVisuGen->LoadTexture(theTextureFile); } + + /* Version information */ + char* VISU_Gen_i::getVersion() + { + return myVisuGen->getVersion(); + } }; diff --git a/src/ENGINE/VISU_Engine_i.hh b/src/ENGINE/VISU_Engine_i.hh index fa1371bd..77db49de 100644 --- a/src/ENGINE/VISU_Engine_i.hh +++ b/src/ENGINE/VISU_Engine_i.hh @@ -246,6 +246,8 @@ namespace VISU CORBA::Boolean theIsMultiFile, CORBA::Boolean& theIsValidScript); + virtual char* getVersion(); + virtual VISU::ColoredPrs3dCache_ptr GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy); diff --git a/src/PIPELINE/Makefile.am b/src/PIPELINE/Makefile.am index ce858924..6b2cf35f 100644 --- a/src/PIPELINE/Makefile.am +++ b/src/PIPELINE/Makefile.am @@ -132,7 +132,7 @@ libVisuPipeLine_la_LDFLAGS= \ $(GUI_LDFLAGS) -lqtx -lsuit -lvtkTools \ $(MED_LDFLAGS) \ ../CONVERTOR/libVisuConvertor.la \ - $(MED3_LIBS) \ + $(MED3_LIBS_C_ONLY) \ $(QT_LIBS) \ $(OGL_LIBS) diff --git a/src/VISUGUI/VISU_msg_en.ts b/src/VISUGUI/VISU_msg_en.ts index 40bcbdbb..792a7f3d 100644 --- a/src/VISUGUI/VISU_msg_en.ts +++ b/src/VISUGUI/VISU_msg_en.ts @@ -673,7 +673,7 @@ Input value precision can be adjusted using FLT_MED_FILES - MED Files (*.med) + MED Files (*.*med) FLT_SAUV_FILES @@ -1263,7 +1263,7 @@ Input value precision can be adjusted using FLT_MED_FILES - MED Files (*.med) + MED Files (*.*med) FLT_SAUV_FILES diff --git a/src/VISU_I/Makefile.am b/src/VISU_I/Makefile.am index 851b7e56..f23aac55 100644 --- a/src/VISU_I/Makefile.am +++ b/src/VISU_I/Makefile.am @@ -132,7 +132,8 @@ libVISUEngineImpl_la_CPPFLAGS= \ -I$(srcdir)/../CONVERTOR \ -I$(srcdir)/../PIPELINE \ -I$(srcdir)/../OBJECT \ - -I$(top_builddir)/idl + -I$(top_builddir)/idl \ + -I$(top_builddir) libVISUEngineImpl_la_LDFLAGS= \ $(KERNEL_LDFLAGS) \ diff --git a/src/VISU_I/VISU_DumpPython.cc b/src/VISU_I/VISU_DumpPython.cc index 6180a586..31b14b88 100644 --- a/src/VISU_I/VISU_DumpPython.cc +++ b/src/VISU_I/VISU_DumpPython.cc @@ -1593,7 +1593,7 @@ namespace VISU bool withZ = aServant->GetZRow()>0; bool isV2 = aServant->GetIsV2(); - theStr << thePrefix << "aName2ObjectMap['" << aName << "'] = visu.CreateCurve"; + theStr << thePrefix << aName << " = visu.CreateCurve"; if( isV2 ) theStr << "WithZExt"; else if( withZ ) @@ -1636,6 +1636,8 @@ namespace VISU case Curve::DASHDOTDOTLINE: aParam = "VISU.Curve.DASHDOTDOTLINE"; break; } theStr<<", "<GetLineWidth()<<")"<Object map + theStr << thePrefix << "aName2ObjectMap['" << aName << "'] = " << aName << endl; } return; case VISU::TTABLE: @@ -2427,33 +2429,31 @@ namespace VISU aStr, aPrefix); - if (theIsPublished) - { - SALOMEDS::AttributeParameter_var ap = aStudy->GetModuleParameters("Interface Applicative", "Post-Pro", -1); - if(!CORBA::is_nil(ap)) { - std::map::iterator it = aEntry2NameMap.begin(); - for( ;it != aEntry2NameMap.end(); it++ ) { - //1. Encode entry - if ( ((*it).first).length() < 7 ) continue; - std::string tail( (*it).first, 6, ((*it).first).length()-1 ); - std::string newEntry(ComponentDataType()); - newEntry+=("_"+tail); - - CORBA::String_var anEntry = CORBA::string_dup(newEntry.c_str()); + if (theIsPublished) { + SALOMEDS::AttributeParameter_var ap = aStudy->GetModuleParameters("Interface Applicative", "Post-Pro", -1); + if (!CORBA::is_nil(ap)) { + std::map::iterator it = aEntry2NameMap.begin(); + for ( ;it != aEntry2NameMap.end(); it++ ) { + //1. Encode entry + if ( ((*it).first).length() < 7 ) continue; + std::string tail( (*it).first, 6 ); + std::string newEntry(ComponentDataType()); + newEntry = newEntry + "_" + tail; + + CORBA::String_var anEntry = CORBA::string_dup( newEntry.c_str() ); - if( ap->IsSet(anEntry, 6) ) { //6 Means string array, see SALOMEDS_Attributes.idl AttributeParameter interface - std::string idCommand = std::string("visu.getObjectID(") + (*it).second + std::string(")"); - SALOMEDS::StringSeq_var aSeq= ap->GetStrArray(anEntry); - int oldLenght = aSeq->length(); - aSeq->length(oldLenght+2); - aSeq[oldLenght] = CORBA::string_dup("_PT_OBJECT_ID_"); - aSeq[oldLenght + 1] = CORBA::string_dup(idCommand.c_str()); - ap->SetStrArray( anEntry, aSeq ); - } + if ( ap->IsSet( anEntry.in(), 6 ) ) { //6 Means string array, see SALOMEDS_Attributes.idl AttributeParameter interface + std::string idCommand = std::string("visu.getObjectID(") + (*it).second + std::string(")"); + SALOMEDS::StringSeq_var aSeq= ap->GetStrArray(anEntry); + int oldLenght = aSeq->length(); + aSeq->length(oldLenght+2); + aSeq[oldLenght] = CORBA::string_dup("_PT_OBJECT_ID_"); + aSeq[oldLenght + 1] = CORBA::string_dup(idCommand.c_str()); + ap->SetStrArray( anEntry, aSeq ); } } - } - + } + } //Output the script that sets up the visul parameters. if(theIsPublished) { diff --git a/src/VISU_I/VISU_Gen_i.cc b/src/VISU_I/VISU_Gen_i.cc index 8c222302..c93ba092 100644 --- a/src/VISU_I/VISU_Gen_i.cc +++ b/src/VISU_I/VISU_Gen_i.cc @@ -25,6 +25,7 @@ // Author : Alexey PETROV // Module : VISU +#include "VISU_version.h" #include "VISU_Gen_i.hh" #include "VISU_Result_i.hh" #include "VISU_PrsObject_i.hh" @@ -1876,4 +1877,14 @@ namespace VISU return aMarkerId; } + + // Version information + char* VISU_Gen_i::getVersion() + { +#if VISU_DEVELOPMENT + return CORBA::string_dup( VISU_VERSION_STR"dev" ); +#else + return CORBA::string_dup( VISU_VERSION_STR ); +#endif + } } diff --git a/src/VISU_I/VISU_Gen_i.hh b/src/VISU_I/VISU_Gen_i.hh index 7513387d..5d3f39d7 100644 --- a/src/VISU_I/VISU_Gen_i.hh +++ b/src/VISU_I/VISU_Gen_i.hh @@ -394,6 +394,9 @@ namespace VISU CORBA::Long theObjectID, SALOMEDS::SObject_ptr theObject); + + char* getVersion(); + virtual VISU::ColoredPrs3dCache_ptr GetColoredPrs3dCache(SALOMEDS::Study_ptr theStudy); diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 41e5347e..4ef802f8 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -752,7 +752,7 @@ VISU::Result_i static QString aCommand; std::string aFilePath = theTmpDir + aFileName; - aCommand.sprintf(" %s %s", GetFileInfo().filePath().toLatin1().data(), aFilePath.c_str()); + aCommand.sprintf(" \"%s\" \"%s\"", GetFileInfo().filePath().toLatin1().data(), aFilePath.c_str()); aCommand = QDir::convertSeparators( aCommand ); aCommand.prepend( COPY_COMMAND ); @@ -859,7 +859,7 @@ VISU::Result_i if (theIsMultiFile) { // set this file as new - temporary static QString aCommand; - aCommand.sprintf(" %s %s%s",aHDFFileName, aResultPath, myFileInfo.baseName().toLatin1().data()); + aCommand.sprintf(" \"%s\" \"%s%s\"",aHDFFileName, aResultPath, myFileInfo.baseName().toLatin1().data()); aCommand = QDir::convertSeparators( aCommand ); aCommand.prepend( MOVE_COMMAND ); @@ -872,7 +872,7 @@ VISU::Result_i myFileInfo.setFile(QString(aResultPath) + myFileInfo.baseName()); } else { // change current temporary file to the new: with hdf-format static QString aCommand; - aCommand.sprintf(" %s %s\0",aHDFFileName, myFileInfo.filePath().toLatin1().data()); + aCommand.sprintf(" \"%s\" \"%s\"\0",aHDFFileName, myFileInfo.filePath().toLatin1().data()); aCommand = QDir::convertSeparators( aCommand ); aCommand.prepend( MOVE_COMMAND ); @@ -1449,7 +1449,7 @@ VISU::Result_i { static QString aCommand; const char* aTempFileName = myFileInfo.absoluteFilePath().toLatin1(); - aCommand.sprintf(" %s %s", aTempFileName, theTargetFileName); + aCommand.sprintf(" \"%s\" \"%s\"", aTempFileName, theTargetFileName); aCommand = QDir::convertSeparators( aCommand ); aCommand.prepend( COPY_COMMAND );