Bug PAL12904 (slow display with geompy). UpdateViewer() method implementation.

This commit is contained in:
mzn 2006-09-05 13:06:16 +00:00
parent ff62909884
commit 2478492e4d
3 changed files with 21 additions and 0 deletions

View File

@ -269,6 +269,25 @@ void GEOM_Swig::createAndDisplayFitAllGO (const char* Entry)
ProcessVoidEvent(new TEventFitAll());
}
void GEOM_Swig::UpdateViewer()
{
class TEventUpdateViewer: public SALOME_Event
{
public:
TEventUpdateViewer() {}
virtual void Execute() {
SUIT_Application* app = SUIT_Session::session()->activeApplication();
if (!app) return;
SalomeApp_Study* ActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
if (!ActiveStudy) return;
GEOM_Displayer(ActiveStudy).UpdateViewer();
}
};
ProcessVoidEvent(new TEventUpdateViewer());
}
int GEOM_Swig::getIndexTopology(const char* SubIOR, const char* IOR)
{
GEOM::GEOM_Gen_var aGeomGen = GeometryGUI::GetGeomGen();

View File

@ -52,6 +52,7 @@ public:
void createAndDisplayGO(const char* Entry, bool isUpdated = true);
void eraseGO(const char* Entry, bool allWindows);
void createAndDisplayFitAllGO(const char* Entry);
void UpdateViewer();
void setDisplayMode(const char* Entry, int mode, bool isUpdated = true);
void setColor(const char* Entry, int red, int green, int blue, bool isUpdated = true);
void setTransparency(const char* Entry, float transp, bool isUpdated = true);

View File

@ -59,6 +59,7 @@ class GEOM_Swig
void createAndDisplayGO(const char* Entry, bool isUpdated =true);
void eraseGO(const char* Entry, bool allWindows);
void createAndDisplayFitAllGO(const char* Entry);
void UpdateViewer();
int getIndexTopology(const char *SubEntry, const char *Entry);
const char* getShapeTypeString(const char *Entry);