From: rnv Date: Tue, 28 Mar 2017 14:12:25 +0000 (+0300) Subject: 23398: EDF 13832 PARAVIS: Paraview windows cannot be docked as a tab. X-Git-Tag: V8_3_0rc1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3c4cd07c2dcaad33034beb8e9779c98b1d976379;p=modules%2Fgui.git 23398: EDF 13832 PARAVIS: Paraview windows cannot be docked as a tab. --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 307579e47..da1936388 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -3672,10 +3672,15 @@ void LightApp_Application::preferencesChanged( const QString& sec, const QString } if ( sec == "desktop" && param == "opaque_resize" ) { bool opaqueResize = resMgr->booleanValue( "desktop", "opaque_resize", false ); - QMainWindow::DockOptions dopts = desktop()->dockOptions(); - if ( opaqueResize ) dopts |= QMainWindow::AnimatedDocks; - else dopts &= ~QMainWindow::AnimatedDocks; - desktop()->setDockOptions( dopts ); + // RNV: This code has been commented, because clearing of the QMainWindow::AnimatedDocks option + // leads to strange behaviour of the dockable windows (at least at qt-5.6.1): + // any dockable window can't be docked to the another area, except initial area. + // It is possible to move window to another area, but it always returns to the initial area. + // + // QMainWindow::DockOptions dopts = desktop()->dockOptions(); + // if ( opaqueResize ) dopts |= QMainWindow::AnimatedDocks; + // else dopts &= ~QMainWindow::AnimatedDocks; + // desktop()->setDockOptions( dopts ); desktop()->setOpaqueResize( opaqueResize ); if ( dynamic_cast( desktop() ) ) dynamic_cast( desktop() )->workstack()->setOpaqueResize( opaqueResize ); @@ -3743,10 +3748,10 @@ void LightApp_Application::loadPreferences() if ( desktop() ) { desktop()->retrieveGeometry( aResMgr->stringValue( "desktop", "geometry" ) ); bool opaqueResize = aResMgr->booleanValue( "desktop", "opaque_resize", false ); - QMainWindow::DockOptions dopts = desktop()->dockOptions(); - if ( opaqueResize ) dopts |= QMainWindow::AnimatedDocks; - else dopts &= ~QMainWindow::AnimatedDocks; - desktop()->setDockOptions( dopts ); + // QMainWindow::DockOptions dopts = desktop()->dockOptions(); + // if ( opaqueResize ) dopts |= QMainWindow::AnimatedDocks; + // else dopts &= ~QMainWindow::AnimatedDocks; + // desktop()->setDockOptions( dopts ); desktop()->setOpaqueResize( opaqueResize ); if ( dynamic_cast( desktop() ) ) dynamic_cast( desktop() )->workstack()->setOpaqueResize( opaqueResize );