From ae9a0eb5183aed309e0e6b9c6e6e905273761ad0 Mon Sep 17 00:00:00 2001 From: vsv Date: Thu, 4 Sep 2014 17:52:18 +0400 Subject: [PATCH] Issue #25: forbid top area for dock windows --- src/XGUI/XGUI_MainWindow.cpp | 4 ++-- src/XGUI/XGUI_Workshop.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/XGUI/XGUI_MainWindow.cpp b/src/XGUI/XGUI_MainWindow.cpp index 6d619d818..b1171dc64 100644 --- a/src/XGUI/XGUI_MainWindow.cpp +++ b/src/XGUI/XGUI_MainWindow.cpp @@ -89,8 +89,8 @@ void XGUI_MainWindow::dockPythonConsole() myMenuBar->removeConsole(); QDockWidget* aDock = new QDockWidget(this); aDock->setFeatures(QDockWidget::AllDockWidgetFeatures | QDockWidget::DockWidgetVerticalTitleBar); -// aDock->setAllowedAreas( -// Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); + aDock->setAllowedAreas( + Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); aDock->setMinimumHeight(0); aDock->setWindowTitle("Console"); aDock->setWidget(myPythonConsole); diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 44fc8d1f7..be21a2825 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -827,7 +827,7 @@ QList XGUI_Workshop::getModuleCommands() const QDockWidget* XGUI_Workshop::createObjectBrowser(QWidget* theParent) { QDockWidget* aObjDock = new QDockWidget(theParent); - //aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea); + aObjDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); aObjDock->setWindowTitle(tr("Object browser")); aObjDock->setStyleSheet( "::title { position: relative; padding-left: 5px; text-align: left center }"); @@ -851,6 +851,7 @@ void XGUI_Workshop::createDockWidgets() QDockWidget* aObjDock = createObjectBrowser(aDesktop); aDesktop->addDockWidget(Qt::LeftDockWidgetArea, aObjDock); myPropertyPanel = new XGUI_PropertyPanel(aDesktop); + myPropertyPanel->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::BottomDockWidgetArea); aDesktop->addDockWidget(Qt::LeftDockWidgetArea, myPropertyPanel); hidePropertyPanel(); //