From: rnv Date: Wed, 24 Dec 2008 11:03:32 +0000 (+0000) Subject: Now after "Update Study" NoteBook dialog box keep its position. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c0fff9bd50b3cbd194b5b8850384195a74bd58b9;p=modules%2Fgui.git Now after "Update Study" NoteBook dialog box keep its position. --- diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index 574f271b4..4a6d7d433 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -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(); } diff --git a/src/SalomeApp/SalomeApp_NoteBookDlg.cxx b/src/SalomeApp/SalomeApp_NoteBookDlg.cxx index a5c148be8..6005d889a 100644 --- a/src/SalomeApp/SalomeApp_NoteBookDlg.cxx +++ b/src/SalomeApp/SalomeApp_NoteBookDlg.cxx @@ -1044,6 +1044,11 @@ void SalomeApp_NoteBookDlg::clearStudy() QList 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(); }