2019-05-06 03:36:05 -05:00
|
|
|
#include "RiuMdiMaximizeWindowGuard.h"
|
|
|
|
|
|
|
|
#include "RiaGuiApplication.h"
|
|
|
|
#include "RiuMainWindow.h"
|
|
|
|
#include "RiuPlotMainWindow.h"
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RiuMdiMaximizeWindowGuard::RiuMdiMaximizeWindowGuard()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RiuMainWindow* mainWindow = RiaGuiApplication::instance()->mainWindow();
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( mainWindow )
|
2019-05-06 03:36:05 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
mainWindow->enableShowFirstVisibleMdiWindowMaximized( false );
|
2019-05-06 03:36:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
RiuPlotMainWindow* plotMainWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( plotMainWindow )
|
2019-05-06 03:36:05 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
plotMainWindow->enableShowFirstVisibleMdiWindowMaximized( false );
|
2019-05-06 03:36:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RiuMdiMaximizeWindowGuard::~RiuMdiMaximizeWindowGuard()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
RiuMainWindow* mainWindow = RiaGuiApplication::instance()->mainWindow();
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( mainWindow )
|
2019-05-06 03:36:05 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
mainWindow->enableShowFirstVisibleMdiWindowMaximized( true );
|
2019-05-06 03:36:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
RiuPlotMainWindow* plotMainWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( plotMainWindow )
|
2019-05-06 03:36:05 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
plotMainWindow->enableShowFirstVisibleMdiWindowMaximized( true );
|
2019-05-06 03:36:05 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|