diff options
Diffstat (limited to 'plugins/autotest/testresultspane.cpp')
-rw-r--r-- | plugins/autotest/testresultspane.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/autotest/testresultspane.cpp b/plugins/autotest/testresultspane.cpp index 3d9e874bdf5..0d6b9052b84 100644 --- a/plugins/autotest/testresultspane.cpp +++ b/plugins/autotest/testresultspane.cpp @@ -185,23 +185,20 @@ void TestResultsPane::clearContents() void TestResultsPane::visibilityChanged(bool visible) { + if (visible == m_wasVisibleBefore) + return; if (visible) { - if (m_wasVisibleBefore) - return; connect(TestTreeModel::instance(), &TestTreeModel::testTreeModelChanged, this, &TestResultsPane::onTestTreeModelChanged); // make sure run/run all are in correct state onTestTreeModelChanged(); - m_wasVisibleBefore = true; TestTreeModel::instance()->enableParsing(); } else { - if (!m_wasVisibleBefore) - return; disconnect(TestTreeModel::instance(), &TestTreeModel::testTreeModelChanged, this, &TestResultsPane::onTestTreeModelChanged); - m_wasVisibleBefore = false; TestTreeModel::instance()->disableParsing(); } + m_wasVisibleBefore = visible; } void TestResultsPane::setFocus() |