]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Now after "Update Study" NoteBook dialog box keep its position. BR_DumpPython_Extension
authorrnv <rnv@opencascade.com>
Wed, 24 Dec 2008 11:03:32 +0000 (11:03 +0000)
committerrnv <rnv@opencascade.com>
Wed, 24 Dec 2008 11:03:32 +0000 (11:03 +0000)
src/SalomeApp/SalomeApp_Application.cxx
src/SalomeApp/SalomeApp_NoteBookDlg.cxx

index 574f271b417cf583a7dfe53d9c798d4a4b5145cc..4a6d7d4337c3d4ae869cd4b30f5355e93e444abd 100644 (file)
@@ -727,6 +727,9 @@ void SalomeApp_Application::onNoteBook()
     }
     else if(!myNoteBook->isVisible()){
       myNoteBook->Init(aStudy);
+      myNoteBook->adjustSize();
+      myNoteBook->move((int)(desktop()->x() + desktop()->width()/2  - myNoteBook->frameGeometry().width()/2),
+                       (int)(desktop()->y() + desktop()->height()/2 - myNoteBook->frameGeometry().height()/2));
     }
     myNoteBook->show();
   }
index a5c148be811bd834f198100c2cbf957b6ea2f66b..6005d889acdf28d65d248eaed48ebab4b0adf486 100644 (file)
@@ -1044,6 +1044,11 @@ void SalomeApp_NoteBookDlg::clearStudy()
   QList<SUIT_Application*> aList = SUIT_Session::session()->applications();
   int anIndex = aList.indexOf( app );
 
+  //Store position and size of the this dialog
+  int aW = width();
+  int aH = height();
+  int aX = x();
+  int aY = y();
 
   // Disconnect dialog from application desktop in case if:
   // 1) Application is not the first application in the session        
@@ -1070,5 +1075,8 @@ void SalomeApp_NoteBookDlg::clearStudy()
     setParent( app->desktop(), Qt::Dialog );
     app->setNoteBook(this);
   }
+  //Set position and size of the this dialog
+  resize( aW, aH );
+  move( aX, aY );
   show();
 }