mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-05-26 07:40:48 +05:00
Using GEOM_Displayer
This commit is contained in:
parent
abd4364700
commit
277688e40f
@ -51,6 +51,7 @@
|
|||||||
#include "GEOM_AISShape.hxx"
|
#include "GEOM_AISShape.hxx"
|
||||||
#include "GEOM_AssemblyBuilder.h"
|
#include "GEOM_AssemblyBuilder.h"
|
||||||
#include "GEOM_InteractiveObject.hxx"
|
#include "GEOM_InteractiveObject.hxx"
|
||||||
|
#include "GEOM_Displayer.h"
|
||||||
|
|
||||||
#include "SALOME_Event.hxx"
|
#include "SALOME_Event.hxx"
|
||||||
|
|
||||||
@ -177,7 +178,8 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
"GEOM",
|
"GEOM",
|
||||||
const_cast<char*>( obj->GetID().c_str()));
|
const_cast<char*>( obj->GetID().c_str()));
|
||||||
|
|
||||||
if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) {
|
GEOM_Displayer(ActiveStudy).Display(anIO, true);
|
||||||
|
/*if (SVTK_ViewWindow* aViewWindow = GetSVTKViewWindow(app)) {
|
||||||
SVTK_View* aView = aViewWindow->getView();
|
SVTK_View* aView = aViewWindow->getView();
|
||||||
int aMode = aView->GetDisplayMode();
|
int aMode = aView->GetDisplayMode();
|
||||||
|
|
||||||
@ -199,15 +201,16 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
aSh->setIO(anIO);
|
aSh->setIO(anIO);
|
||||||
ic->Display(aSh);
|
ic->Display(aSh);
|
||||||
ic->AddOrRemoveCurrentObject(aSh,true);
|
ic->AddOrRemoveCurrentObject(aSh,true);
|
||||||
}
|
}*/
|
||||||
// update object browser
|
// update object browser
|
||||||
SalomeApp_Application* app = NULL; //dynamic_cast<SalomeApp_Application*>(app);
|
// Already defined as a next operation
|
||||||
|
/* SalomeApp_Application* app = NULL; //dynamic_cast<SalomeApp_Application*>(app);
|
||||||
if (app) {
|
if (app) {
|
||||||
CAM_Module* module = app->module("Geometry");
|
CAM_Module* module = app->module("Geometry");
|
||||||
SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>(module);
|
SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>(module);
|
||||||
if (appMod)
|
if (appMod)
|
||||||
appMod->updateObjBrowser(true);
|
appMod->updateObjBrowser(true);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -484,9 +487,13 @@ void GEOM_Swig::eraseGO (const char* Entry, bool allWindows)
|
|||||||
{
|
{
|
||||||
SUIT_Application* app = SUIT_Session::session()->activeApplication();
|
SUIT_Application* app = SUIT_Session::session()->activeApplication();
|
||||||
if (!app) return;
|
if (!app) return;
|
||||||
|
SalomeApp_Study* ActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
|
||||||
|
if (!ActiveStudy) return;
|
||||||
|
|
||||||
Handle (SALOME_InteractiveObject) aIO = new SALOME_InteractiveObject(myEntry.c_str(), "GEOM", "");
|
Handle (SALOME_InteractiveObject) aIO = new SALOME_InteractiveObject(myEntry.c_str(), "GEOM", "");
|
||||||
|
|
||||||
if (myFromAllWindows) {
|
GEOM_Displayer(ActiveStudy).Erase(aIO, true);
|
||||||
|
/* if (myFromAllWindows) {
|
||||||
QPtrList<SUIT_ViewWindow> aWindows = app->desktop()->windows();
|
QPtrList<SUIT_ViewWindow> aWindows = app->desktop()->windows();
|
||||||
SUIT_ViewWindow* aWin = 0;
|
SUIT_ViewWindow* aWin = 0;
|
||||||
for (aWin = aWindows.first(); aWin; aWin = aWindows.next()) {
|
for (aWin = aWindows.first(); aWin; aWin = aWindows.next()) {
|
||||||
@ -496,10 +503,10 @@ void GEOM_Swig::eraseGO (const char* Entry, bool allWindows)
|
|||||||
SUIT_ViewWindow* aWin = app->desktop()->activeWindow();
|
SUIT_ViewWindow* aWin = app->desktop()->activeWindow();
|
||||||
if (aWin)
|
if (aWin)
|
||||||
EraseObject(aWin, aIO);
|
EraseObject(aWin, aIO);
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
/* private:
|
||||||
void EraseObject(SUIT_ViewWindow* theWin, Handle (SALOME_InteractiveObject) theIO)
|
void EraseObject(SUIT_ViewWindow* theWin, Handle (SALOME_InteractiveObject) theIO)
|
||||||
{
|
{
|
||||||
if (theWin->getViewManager()->getType() == OCCViewer_Viewer::Type()){
|
if (theWin->getViewManager()->getType() == OCCViewer_Viewer::Type()){
|
||||||
@ -526,7 +533,7 @@ void GEOM_Swig::eraseGO (const char* Entry, bool allWindows)
|
|||||||
aViewWindow->Erase(theIO);
|
aViewWindow->Erase(theIO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
};
|
};
|
||||||
ProcessVoidEvent(new TEvent(Entry, allWindows));
|
ProcessVoidEvent(new TEvent(Entry, allWindows));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user