mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Get rid of "ghost" windows on startup. (#9171)
* Get rid of "ghost" windows on startup. Removes hide all docking windows feature for now, to be replaced by a new implementation. Will probably break some tests due to this.
This commit is contained in:
committed by
Magne Sjaastad
parent
b5708424e2
commit
99f17f1818
@@ -425,8 +425,7 @@ void RiaGuiApplication::initialize()
|
||||
// Create main windows
|
||||
// The plot window is created to be able to set expanded state on created objects, but hidden by default
|
||||
getOrCreateAndShowMainWindow();
|
||||
RiuPlotMainWindow* plotMainWindow = getOrCreateMainPlotWindow();
|
||||
plotMainWindow->hideAllDockWidgets();
|
||||
getOrCreateMainPlotWindow();
|
||||
|
||||
RiuGuiTheme::updateGuiTheme( m_preferences->guiTheme() );
|
||||
|
||||
@@ -968,7 +967,6 @@ void RiaGuiApplication::createMainWindow()
|
||||
m_mainWindow->setWindowTitle( "ResInsight " + platform );
|
||||
m_mainWindow->setDefaultWindowSize();
|
||||
m_mainWindow->setDefaultToolbarVisibility();
|
||||
m_mainWindow->storeDefaultDockWidgetVisibilitiesIfRequired();
|
||||
m_mainWindow->loadWinGeoAndDockToolBarLayout();
|
||||
m_mainWindow->showWindow();
|
||||
}
|
||||
@@ -996,18 +994,12 @@ void RiaGuiApplication::createMainPlotWindow()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuPlotMainWindow* RiaGuiApplication::getOrCreateAndShowMainPlotWindow()
|
||||
{
|
||||
bool triggerReloadOfDockWidgetVisibilities = false;
|
||||
|
||||
if ( !m_mainPlotWindow )
|
||||
{
|
||||
createMainPlotWindow();
|
||||
m_mainPlotWindow->initializeGuiNewProjectLoaded();
|
||||
loadAndUpdatePlotData();
|
||||
}
|
||||
else
|
||||
{
|
||||
triggerReloadOfDockWidgetVisibilities = !m_mainPlotWindow->isVisible();
|
||||
}
|
||||
|
||||
if ( m_mainPlotWindow->isMinimized() )
|
||||
{
|
||||
@@ -1022,11 +1014,6 @@ RiuPlotMainWindow* RiaGuiApplication::getOrCreateAndShowMainPlotWindow()
|
||||
m_mainPlotWindow->raise();
|
||||
m_mainPlotWindow->activateWindow();
|
||||
|
||||
if ( triggerReloadOfDockWidgetVisibilities )
|
||||
{
|
||||
m_mainPlotWindow->restoreDockWidgetVisibilities();
|
||||
}
|
||||
|
||||
return m_mainPlotWindow.get();
|
||||
}
|
||||
|
||||
@@ -1252,8 +1239,6 @@ void RiaGuiApplication::onProjectOpened()
|
||||
m_mainPlotWindow->show();
|
||||
m_mainPlotWindow->raise();
|
||||
}
|
||||
|
||||
m_mainPlotWindow->restoreDockWidgetVisibilities();
|
||||
}
|
||||
else if ( mainPlotWindow() )
|
||||
{
|
||||
@@ -1640,8 +1625,6 @@ void RiaGuiApplication::runMultiCaseSnapshots( const QString& templateProj
|
||||
{
|
||||
if ( !m_mainWindow ) return;
|
||||
|
||||
m_mainWindow->hideAllDockWidgets();
|
||||
|
||||
const size_t numGridFiles = gridFileNames.size();
|
||||
for ( size_t i = 0; i < numGridFiles; i++ )
|
||||
{
|
||||
@@ -1656,8 +1639,6 @@ void RiaGuiApplication::runMultiCaseSnapshots( const QString& templateProj
|
||||
RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( snapshotFolderName );
|
||||
}
|
||||
}
|
||||
|
||||
m_mainWindow->loadWinGeoAndDockToolBarLayout();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user