mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
Regression Test : Do not show warning/error dock window
This commit is contained in:
parent
bffc50b826
commit
1a6c529488
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#include "RiuMessagePanel.h"
|
#include "RiuMessagePanel.h"
|
||||||
|
|
||||||
|
#include "RiaRegressionTestRunner.h"
|
||||||
|
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
@ -71,12 +73,15 @@ void RiuMessagePanel::addMessage(RILogLevel messageLevel, const QString& msg)
|
|||||||
m_textEdit->moveCursor(QTextCursor::End);
|
m_textEdit->moveCursor(QTextCursor::End);
|
||||||
m_textEdit->ensureCursorVisible();
|
m_textEdit->ensureCursorVisible();
|
||||||
|
|
||||||
if (messageLevel == RI_LL_ERROR || messageLevel == RI_LL_WARNING)
|
if (!RiaRegressionTestRunner::instance()->isRunningRegressionTests())
|
||||||
{
|
{
|
||||||
QDockWidget* parentDockWidget = dynamic_cast<QDockWidget*>(this->parent());
|
if (messageLevel == RI_LL_ERROR || messageLevel == RI_LL_WARNING)
|
||||||
if (parentDockWidget && !parentDockWidget->isVisible())
|
|
||||||
{
|
{
|
||||||
parentDockWidget->toggleViewAction()->trigger();
|
QDockWidget* parentDockWidget = dynamic_cast<QDockWidget*>(this->parent());
|
||||||
|
if (parentDockWidget && !parentDockWidget->isVisible())
|
||||||
|
{
|
||||||
|
parentDockWidget->toggleViewAction()->trigger();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user