mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
50 lines
1.5 KiB
C++
50 lines
1.5 KiB
C++
#include "RiuMdiMaximizeWindowGuard.h"
|
|
|
|
#include "RiaGuiApplication.h"
|
|
#include "RiuMainWindow.h"
|
|
#include "RiuPlotMainWindow.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
RiuMdiMaximizeWindowGuard::RiuMdiMaximizeWindowGuard()
|
|
{
|
|
{
|
|
RiuMainWindow* mainWindow = RiaGuiApplication::instance()->mainWindow();
|
|
if ( mainWindow )
|
|
{
|
|
mainWindow->enableShowFirstVisibleMdiWindowMaximized( false );
|
|
}
|
|
}
|
|
|
|
{
|
|
RiuPlotMainWindow* plotMainWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
|
if ( plotMainWindow )
|
|
{
|
|
plotMainWindow->enableShowFirstVisibleMdiWindowMaximized( false );
|
|
}
|
|
}
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
RiuMdiMaximizeWindowGuard::~RiuMdiMaximizeWindowGuard()
|
|
{
|
|
{
|
|
RiuMainWindow* mainWindow = RiaGuiApplication::instance()->mainWindow();
|
|
if ( mainWindow )
|
|
{
|
|
mainWindow->enableShowFirstVisibleMdiWindowMaximized( true );
|
|
}
|
|
}
|
|
|
|
{
|
|
RiuPlotMainWindow* plotMainWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
|
if ( plotMainWindow )
|
|
{
|
|
plotMainWindow->enableShowFirstVisibleMdiWindowMaximized( true );
|
|
}
|
|
}
|
|
}
|