ResInsight/ApplicationCode/UserInterface/RiuMdiMaximizeWindowGuard.cpp
2019-09-06 10:57:22 +02:00

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 );
}
}
}