ProcessVoidEvent(new TVoidMemFunEvent<Plot2d_ViewFrame>(myView,&Plot2d_ViewFrame::Repaint));
}
+ struct TCloseViewEvent: public SALOME_Event
+ {
+ SUIT_ViewWindow* myView;
+ TCloseViewEvent (SUIT_ViewWindow* theView):
+ myView(theView)
+ {}
+
+ virtual void Execute()
+ {
+ if ( myView ) myView->close();
+ }
+ };
+
void XYPlot_i::Close()
{
- //jfa: may be need to be enclosed in SALOME_Event?
- SUIT_ViewWindow* aVW = GetViewWindow();
- if (aVW)
- aVW->close();
- //QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
- //int aPos = aViews.find(myViewWindow);
- //if (aPos >= 0)
- // myViewWindow->close();
+ ProcessVoidEvent(new TCloseViewEvent(GetViewWindow()));
+ QApplication::sendPostedEvents();
}
XYPlot_i::~XYPlot_i() {
void View3D_i::Close()
{
- //jfa: may be need to be enclosed in SALOME_Event?
- SUIT_ViewWindow* aVW = GetViewWindow();
- if (aVW)
- aVW->close();
- //QPtrVector<SUIT_ViewWindow> aViews = myViewManager->getViews();
- //int aPos = aViews.find(myViewWindow);
- //if (aPos >= 0)
- // myViewWindow->close();
+ ProcessVoidEvent(new TCloseViewEvent(GetViewWindow()));
+ QApplication::sendPostedEvents();
}
-
+
View3D_i::~View3D_i()
{
if(MYDEBUG) MESSAGE("View3D_i::~View3D_i");