Skip to content
Snippets Groups Projects
Commit 8adc4058 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

+ assert

parent b4e3ee66
No related branches found
No related tags found
1 merge request!2667simplify Jobpar view update; fix crash upon reloading project (#1006)
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
// ************************************************************************************************ // ************************************************************************************************
#include "GUI/View/Job/JobMessagesDisplay.h" #include "GUI/View/Job/JobMessagesDisplay.h"
#include "Base/Util/Assert.h"
#include "GUI/Model/Job/BatchInfo.h" #include "GUI/Model/Job/BatchInfo.h"
#include "GUI/Model/Job/JobItem.h" #include "GUI/Model/Job/JobItem.h"
#include "GUI/Model/Job/JobStatus.h" #include "GUI/Model/Job/JobStatus.h"
...@@ -45,6 +46,7 @@ void JobMessagesDisplay::setJobItem(JobItem* jobItem) ...@@ -45,6 +46,7 @@ void JobMessagesDisplay::setJobItem(JobItem* jobItem)
{ {
m_job_item = jobItem; m_job_item = jobItem;
if (m_job_item) { if (m_job_item) {
ASSERT(m_job_item->batchInfo());
const bool ok = isFailed(m_job_item->batchInfo()->status()); const bool ok = isFailed(m_job_item->batchInfo()->status());
m_comments_editor->setTextColor(ok ? Qt::black : Qt::red); m_comments_editor->setTextColor(ok ? Qt::black : Qt::red);
connect(m_job_item->batchInfo(), &BatchInfo::jobCommentsChanged, [this](const QString&) { connect(m_job_item->batchInfo(), &BatchInfo::jobCommentsChanged, [this](const QString&) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment