SUIT_OverrideCursor wc;
QStringList errors;
+ QStringList anEntryList;
for ( QStringList::ConstIterator it = fileNames.begin(); it != fileNames.end(); ++it ) {
QFileInfo aFileInfo( *it );
aResult->SetBuildFields( toBuildFields, toBuildMinMax );
aResult->SetBuildGroups( toBuildGroups );
aResult->Build( toBuildAll, toBuildAtOnce );
+ if( VISU::Result_i* aCResult = dynamic_cast<VISU::Result_i*>( VISU::GetServant( aResult ).in() ) )
+ anEntryList.append( aCResult->GetEntry().c_str() );
application()->putInfo( anInfo + tr("INF_DONE") );
}
} // if ( !toUseBuildProgress )
}
else {
UpdateObjBrowser(this);
+ if( getApp() )
+ getApp()->browseObjects( anEntryList );
}
}
return; // nothing selected
QStringList errors;
+ QStringList anEntryList;
for ( QStringList::ConstIterator it = aFiles.begin(); it != aFiles.end(); ++it ) {
QFileInfo aFileInfo( *it );
QString anInfo( tr("TLT_IMPORT_TABLE") + " " + aFileInfo.filePath() + " ..." );
application()->putInfo( anInfo );
- CORBA::Object_var anObject =
+ SALOMEDS::SObject_var anObject =
GetVisuGen(this)->ImportTables(aFileInfo.filePath().toLatin1().constData(),
aFirstStrAsTitle);
arg( tr( "ERR_ERROR_IN_THE_FILE" ) ) );
}
else {
+ anEntryList.append( anObject->GetID() );
application()->putInfo( anInfo + tr("INF_DONE") );
}
}
}
else {
UpdateObjBrowser(this);
+ if( getApp() )
+ getApp()->browseObjects( anEntryList );
}
}
SALOME_ListIO aListIO;
aSelectionMgr->selectedObjects(aListIO);
+ QStringList anEntryList;
SALOME_ListIteratorOfListIO It (aListIO);
QApplication::setOverrideCursor(Qt::WaitCursor);
for (; It.More(); It.Next()) {
}
}
+ VISU::Result_var aResult;
CORBA::Object_var anObject = VISU::SObjectToObject(aSObject);
if (!CORBA::is_nil(anObject)) {
SALOME_MED::MED_var aMED = SALOME_MED::MED::_narrow(anObject);
if (!CORBA::is_nil(aMED.in()))
- GetVisuGen(this)->ImportMed(aSObject);
+ aResult = GetVisuGen(this)->ImportMed(aSObject);
SALOME_MED::FIELD_var aField = SALOME_MED::FIELD::_narrow(anObject);
if (!CORBA::is_nil(aField.in()))
- GetVisuGen(this)->ImportMedField(aField);
+ aResult = GetVisuGen(this)->ImportMedField(aField);
} else {
SALOMEDS::SObject_var aSFather = aSObject->GetFather();
SALOMEDS::GenericAttribute_var anAttr;
SALOMEDS::AttributeName_var aName = SALOMEDS::AttributeName::_narrow(anAttr);
CORBA::String_var aValue = aName->Value();
if (strcmp(aValue.in(), "MEDFIELD") == 0)
- GetVisuGen(this)->ImportMed(aSObject);
+ aResult = GetVisuGen(this)->ImportMed(aSObject);
}
+
+ if( !CORBA::is_nil( aResult ) )
+ if( VISU::Result_i* aCResult = dynamic_cast<VISU::Result_i*>( VISU::GetServant( aResult ).in() ) )
+ anEntryList.append( aCResult->GetEntry().c_str() );
}
}
UpdateObjBrowser(this, true);
+ if( getApp() )
+ getApp()->browseObjects( anEntryList );
QApplication::restoreOverrideCursor();
}
// create mesh presentation and display it in aViewWindow
VISU::Mesh_i* aPrs = CreateMesh(this, anIO, aViewWindow);
aViewWindow->highlight(anIO, 1);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
// create mesh presentation and display it in aViewWindow
VISU::Mesh_i* aPrs = CreateMesh(this, anIO, aViewWindow);
aViewWindow->highlight(anIO, 1);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
}
::OnCreateScalarMap()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::ScalarMap_i,VisuGUI_ScalarBarDlg,1>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
::OnCreateDeformedShape()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::DeformedShape_i,VisuGUI_DeformedShapeDlg,1>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreateDeformedShapeAndScalarMap()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::DeformedShapeAndScalarMap_i,VisuGUI_DeformedShapeAndScalarMapDlg,1>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreateVectors()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::Vectors_i,VisuGUI_VectorsDlg,1>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreateIsoSurfaces()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::IsoSurfaces_i,VisuGUI_IsoSurfacesDlg,1>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreateCutPlanes()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::CutPlanes_i,VisuGUI_CutPlanesDlg,0>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreateCutLines()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::CutLines_i,VisuGUI_CutLinesDlg,0>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreateCutSegment()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::CutSegment_i,VisuGUI_CutSegmentDlg,0>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreateStreamLines()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::StreamLines_i,VisuGUI_StreamLinesDlg,1>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreatePlot3D()
{
Prs3d_i* aPrs = CreatePrs3d<VISU::Plot3D_i,VisuGUI_Plot3DDlg,0>(this);
- if (aPrs)
- emit presentationCreated(aPrs);
+ processPresentationCreated(aPrs);
}
void
::OnCreatePlot2dView()
{
CheckLock(GetCStudy(GetAppStudy(this)),GetDesktop(this));
- GetVisuGen( this )->CreateContainer();
+ VISU::Container_var aContainer = GetVisuGen( this )->CreateContainer();
UpdateObjBrowser(this);
+
+ if( !CORBA::is_nil( aContainer.in() ) ) {
+ if( VISU::Container_i* aCContainer = dynamic_cast<VISU::Container_i*>( VISU::GetServant( aContainer ).in() ) ) {
+ QStringList anEntryList;
+ anEntryList.append( aCContainer->GetEntry().c_str() );
+ if( getApp() )
+ getApp()->browseObjects( anEntryList );
+ }
+ }
}
void
return new VisuGUI_Selection( (SalomeApp_Module*)this );
}
+void
+VisuGUI
+::processPresentationCreated( VISU::Prs3d_i* thePrs )
+{
+ if( thePrs )
+ {
+ QString anEntry = thePrs->GetEntry().c_str();
+ if( anEntry.isEmpty() )
+ if( VISU::ColoredPrs3d_i* aColoredPrs = dynamic_cast<VISU::ColoredPrs3d_i*>( thePrs ) )
+ anEntry = aColoredPrs->GetHolderEntry().c_str();
+
+ QStringList anEntryList( anEntry );
+ if( getApp() )
+ getApp()->browseObjects( anEntryList );
+
+ emit presentationCreated( thePrs );
+ }
+}
+
//******************************************************************
void VisuGUI::studyActivated()
{
AddScalarBarPosition(this, aSVtkWindow, aPrs3d, aPos);
}
- if (aPrs3d)
- emit presentationCreated(aPrs3d);
+ processPresentationCreated(aPrs3d);
}
}
application()->putInfo(QObject::tr("INF_DONE"));