(#493) Blocking MDI window activation handler when toggling off well log plot

This commit is contained in:
Pål Hagen
2015-09-18 17:06:26 +02:00
parent 9ee13911b3
commit e3e574fb90
3 changed files with 13 additions and 0 deletions

View File

@@ -114,7 +114,10 @@ void RimWellLogPlot::updateViewerWidget()
{
windowGeometry = RiuMainWindow::instance()->windowGeometryForViewer(m_viewer);
RiuMainWindow::instance()->blockSubWindowActivatedSlot(true);
RiuMainWindow::instance()->removeViewer(m_viewer);
RiuMainWindow::instance()->blockSubWindowActivatedSlot(false);
detachAllCurves();
delete m_viewer;
m_viewer = NULL;

View File

@@ -2284,3 +2284,11 @@ bool RiuMainWindow::isAnyMdiSubWindowVisible()
return m_mdiArea->subWindowList().size() > 0;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::blockSubWindowActivatedSlot(bool block)
{
m_blockSlotSubWindowActivated = block;
}

View File

@@ -116,6 +116,8 @@ public:
void tileWindows();
bool isAnyMdiSubWindowVisible();
void blockSubWindowActivatedSlot(bool block);
protected:
virtual void closeEvent(QCloseEvent* event);