mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 17:30:35 +05:00
Modified a method createAndDisplayGO
This commit is contained in:
parent
9c02cfa817
commit
ac5e2558d9
@ -155,7 +155,6 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
|
|
||||||
GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(anIORValue.c_str());
|
GEOM::GEOM_Object_var aShape = Geom->GetIORFromString(anIORValue.c_str());
|
||||||
TopoDS_Shape Shape = ShapeReader.GetShape(Geom,aShape);
|
TopoDS_Shape Shape = ShapeReader.GetShape(Geom,aShape);
|
||||||
|
|
||||||
if (obj) {
|
if (obj) {
|
||||||
if (obj->FindAttribute(anAttr, "AttributeName")) {
|
if (obj->FindAttribute(anAttr, "AttributeName")) {
|
||||||
_PTR(AttributeName) aName (anAttr);
|
_PTR(AttributeName) aName (anAttr);
|
||||||
@ -168,7 +167,6 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
aStudyBuilder->Addreference(newObj1, obj);
|
aStudyBuilder->Addreference(newObj1, obj);
|
||||||
// commit transaction
|
// commit transaction
|
||||||
op->commit();*/
|
op->commit();*/
|
||||||
|
|
||||||
Handle(GEOM_InteractiveObject) anIO =
|
Handle(GEOM_InteractiveObject) anIO =
|
||||||
new GEOM_InteractiveObject (const_cast<char*>(anIORValue.c_str()),
|
new GEOM_InteractiveObject (const_cast<char*>(anIORValue.c_str()),
|
||||||
const_cast<char*>(aFatherIOR.c_str()),
|
const_cast<char*>(aFatherIOR.c_str()),
|
||||||
@ -176,6 +174,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
const_cast<char*>( obj->GetID().c_str()));
|
const_cast<char*>( obj->GetID().c_str()));
|
||||||
|
|
||||||
if (SVTK_ViewWindow* svtkViewWindow = GetSVTKViewWindow(app)) {
|
if (SVTK_ViewWindow* svtkViewWindow = GetSVTKViewWindow(app)) {
|
||||||
|
|
||||||
SVTK_RenderWindowInteractor* aRenderInter= svtkViewWindow->getRWInteractor();
|
SVTK_RenderWindowInteractor* aRenderInter= svtkViewWindow->getRWInteractor();
|
||||||
int aMode = aRenderInter->GetDisplayMode();
|
int aMode = aRenderInter->GetDisplayMode();
|
||||||
|
|
||||||
@ -189,6 +188,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
aRenderInter->Display(GActor);
|
aRenderInter->Display(GActor);
|
||||||
}
|
}
|
||||||
aRenderInter->Update();
|
aRenderInter->Update();
|
||||||
|
cout << 8.2 << endl;
|
||||||
} else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) {
|
} else if (OCCViewer_Viewer* occViewer = GetOCCViewer(app)) {
|
||||||
Handle(AIS_InteractiveContext) ic = occViewer->getAISContext();
|
Handle(AIS_InteractiveContext) ic = occViewer->getAISContext();
|
||||||
Handle(GEOM_AISShape) aSh =
|
Handle(GEOM_AISShape) aSh =
|
||||||
@ -199,7 +199,7 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
ic->AddOrRemoveCurrentObject(aSh,true);
|
ic->AddOrRemoveCurrentObject(aSh,true);
|
||||||
}
|
}
|
||||||
// update object browser
|
// update object browser
|
||||||
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(app);
|
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);
|
||||||
@ -213,6 +213,22 @@ void GEOM_Swig::createAndDisplayGO (const char* Entry)
|
|||||||
|
|
||||||
// MESSAGE("createAndDisplayGO");
|
// MESSAGE("createAndDisplayGO");
|
||||||
ProcessVoidEvent(new TEvent (Entry));
|
ProcessVoidEvent(new TEvent (Entry));
|
||||||
|
|
||||||
|
class TEventUpdateBrowser: public SALOME_Event
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TEventUpdateBrowser() {}
|
||||||
|
virtual void Execute() {
|
||||||
|
SalomeApp_Application* app = dynamic_cast<SalomeApp_Application*>(SUIT_Session::session()->activeApplication());
|
||||||
|
if (app) {
|
||||||
|
CAM_Module* module = app->module("Geometry");
|
||||||
|
SalomeApp_Module* appMod = dynamic_cast<SalomeApp_Module*>(module);
|
||||||
|
if (appMod) appMod->updateObjBrowser(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ProcessVoidEvent(new TEventUpdateBrowser ());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user