{
struct TOnTopEvent: public SALOME_Event
{
- SalomeApp_Application * myApplication;
- SUIT_ViewWindow * myViewWindow;
+ SUIT_ViewWindow * myViewWindow;
public:
- TOnTopEvent (SalomeApp_Application * theApplication,
- SUIT_ViewWindow * theViewWindow):
- myApplication(theApplication),
+ TOnTopEvent (SUIT_ViewWindow * theViewWindow):
myViewWindow(theViewWindow)
{}
virtual void Execute()
{
- SUIT_Desktop* desk = myApplication->desktop();
- STD_TabDesktop* tabDesk = dynamic_cast<STD_TabDesktop*>(desk);
- if (tabDesk) {
- QtxWorkstack* workstack = tabDesk->workstack();
- if (workstack) {
- workstack->OnTop(myViewWindow);
- }
+ if (myViewWindow) {
+ myViewWindow->setFocus();
}
}
};
- ProcessVoidEvent(new TOnTopEvent(myApplication,myViewWindow));
+ ProcessVoidEvent(new TOnTopEvent(myViewWindow));
}
struct TAttractEvent: public SALOME_Event