From f9fa6b83e04eac055c1d71699aa77f84d2f583d6 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 17 Sep 2008 14:42:52 +0000 Subject: [PATCH] *** empty log message *** --- src/VISUGUI/VisuGUI_ClippingPanel.cxx | 2 -- src/VISUGUI/VisuGUI_ClippingPanel.h | 7 +++++-- src/VISUGUI/VisuGUI_Module.cxx | 4 ++-- src/VISU_I/VISU_ColoredPrs3dCache_i.cc | 12 +++++++++++- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.cxx b/src/VISUGUI/VisuGUI_ClippingPanel.cxx index eb3536f3..3cc67c33 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.cxx +++ b/src/VISUGUI/VisuGUI_ClippingPanel.cxx @@ -468,7 +468,6 @@ void VisuGUI_ClippingPanel::onWindowDestroyed(QObject* theWnd) //************************************************************************* void VisuGUI_ClippingPanel::onPresentationCreate(VISU::Prs3d_i* thePrs) { - printf("#### onPresentationCreate PrsNb = %i\n", myPresentations.size()); myPrsList->addItem(getPrsName(thePrs)); myPresentations.append(thePrs->GetEntry().c_str()); for (int i = 0; i < myPlanes.size(); i++) { @@ -862,7 +861,6 @@ bool VisuGUI_ClippingPanel::containsPlane(VISU::Prs3d_i* thePrs, const PlaneDef& //************************************************************************* void VisuGUI_ClippingPanel::onObjectDelete(QString theEntry) { - printf("#### onObjectDelete PrsSize = %i\n", myPresentations.size()); disconnect(myPrsList, SIGNAL(currentRowChanged(int)), this, SLOT(onPrsSelected(int))); int i = 0; foreach (QString aPrsEntry, myPresentations) { diff --git a/src/VISUGUI/VisuGUI_ClippingPanel.h b/src/VISUGUI/VisuGUI_ClippingPanel.h index b96a4dd1..fd145af3 100644 --- a/src/VISUGUI/VisuGUI_ClippingPanel.h +++ b/src/VISUGUI/VisuGUI_ClippingPanel.h @@ -159,7 +159,9 @@ private slots: void applyPlaneToPrs(int thePlaneNum, int thePrsNum, bool isChecked); - QList getPrsList(_PTR(Study) theStudy, _PTR(SObject) theObject); + //QList getPrsList(_PTR(Study) theStudy, _PTR(SObject) theObject); + QStringList getPrsList(_PTR(Study) theStudy, _PTR(SObject) theObject); + VISU::Prs3d_i* getPrs(QString theEntry); VisuGUI* myModule; @@ -171,7 +173,8 @@ private slots: QCheckBox* myAutoApply; QListOfPlanes myPlanes; - QList myPresentations; + // QList myPresentations; + QStringList myPresentations; // Stores entries of presentation objects ListOfPreview myPreview; VisuGUI_ClippingPlaneDlg* myPlaneDlg; diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 72538b7d..41e82105 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -226,7 +226,7 @@ void VisuGUI_Module::initialize( CAM_Application* theApp ) createMenu( tr( "MEN_GAUSS" ), -1, -1, 30 ); //createMenu( GAUSS_CREATE_PRS, aMenuId, 10 ); - /* QString aViewerType = VVTK_Viewer::Type(); + QString aViewerType = SVTK_Viewer::Type(); SUIT_Accel* accel = getApp()->accel(); accel->setActionKey( SUIT_Accel::PanLeft, Qt::Key_Left, aViewerType ); accel->setActionKey( SUIT_Accel::PanRight, Qt::Key_Right, aViewerType ); @@ -243,7 +243,7 @@ void VisuGUI_Module::initialize( CAM_Application* theApp ) connect( getApp(), SIGNAL( viewManagerAdded( SUIT_ViewManager* ) ), this, SLOT( OnViewManagerAdded (SUIT_ViewManager*) ) ); - */ + // Prepare popup menus QtxPopupMgr* mgr = popupMgr(); QString aRule; diff --git a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc index 20b61f01..0e13c330 100644 --- a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc @@ -363,6 +363,15 @@ VISU::ColoredPrs3dCache_i { std::string aFolderName = VISU::ColoredPrs3dCache_i::GetFolderName(); SALOMEDS::SObject_var aSObject = theStudy->FindObject(aFolderName.c_str()); + if (CORBA::is_nil(aSObject)) { + aSObject = theStudy->FindObject("3D Cache System"); + if (!CORBA::is_nil(aSObject)) { + SALOMEDS::StudyBuilder_var aBuilder = theStudy->NewBuilder(); + SALOMEDS::GenericAttribute_var anAttr = aBuilder->FindOrCreateAttribute( aSObject, "AttributeName" ); + SALOMEDS::AttributeName_var aNameAttr = SALOMEDS::AttributeName::_narrow( anAttr ); + aNameAttr->SetValue( GetFolderName().c_str() ); + } + } if(!CORBA::is_nil(aSObject)){ CORBA::Object_var anObject = aSObject->GetObject(); VISU::ColoredPrs3dCache_var aCache = VISU::ColoredPrs3dCache::_narrow(anObject); @@ -475,7 +484,8 @@ std::string VISU::ColoredPrs3dCache_i ::GetFolderName() { - return "3D Cache System"; + //return "3D Cache System"; + return "Presentations"; } //---------------------------------------------------------------------------- -- 2.39.2