Index: trunk/BNC/src/bncapp.cpp
===================================================================
--- trunk/BNC/src/bncapp.cpp	(revision 4345)
+++ trunk/BNC/src/bncapp.cpp	(revision 4346)
@@ -120,4 +120,6 @@
 
   _bncPPPclient = 0;
+
+  _mainWindow = 0;
 }
 
Index: trunk/BNC/src/bncapp.h
===================================================================
--- trunk/BNC/src/bncapp.h	(revision 4345)
+++ trunk/BNC/src/bncapp.h	(revision 4346)
@@ -62,4 +62,6 @@
     const QString& pgmName() {return _pgmName;}
     const QString& userName() {return _userName;}
+    QWidget* mainWindow() const {return _mainWindow;};
+    void setMainWindow(QWidget* mainWindow){_mainWindow = mainWindow;}
   protected:
     virtual bool event(QEvent* ev);
@@ -134,4 +136,5 @@
     bncComb*            _bncComb;
     e_mode              _mode;
+    QWidget*            _mainWindow;
  public:
     bncPPPclient*       _bncPPPclient;
Index: trunk/BNC/src/bncmain.cpp
===================================================================
--- trunk/BNC/src/bncmain.cpp	(revision 4345)
+++ trunk/BNC/src/bncmain.cpp	(revision 4346)
@@ -139,4 +139,5 @@
 
     bncWindow* bncWin = new bncWindow();
+    app.setMainWindow(bncWin);
     bncWin->show();
   }
Index: trunk/BNC/src/rinex/reqcanalyze.cpp
===================================================================
--- trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4345)
+++ trunk/BNC/src/rinex/reqcanalyze.cpp	(revision 4346)
@@ -87,10 +87,11 @@
                                      QVector<t_polarPoint*>* dataMP2) {
 
-  if (((bncApp*) qApp)->mode() == bncApp::interactive) {
-
-    t_polarPlot* plotMP1 = new t_polarPlot(QwtText("MP1"), 0);
+  bncApp* app = dynamic_cast<bncApp*>(qApp);
+  if (app->mode() == bncApp::interactive) {
+
+    t_polarPlot* plotMP1 = new t_polarPlot(QwtText("MP1"), app->mainWindow());
     plotMP1->addCurve(dataMP1);
 
-    t_polarPlot* plotMP2 = new t_polarPlot(QwtText("MP2"), 0);
+    t_polarPlot* plotMP2 = new t_polarPlot(QwtText("MP2"), app->mainWindow());
     plotMP2->addCurve(dataMP2);
     
@@ -101,5 +102,5 @@
     t_graphWin* graphWin = new t_graphWin(0, plots);
 
-    graphWin->show();
+    graphWin->exec();
   }
 }
