From 0c44423268625dfff3eb56a9e9f82e3a42b868e8 Mon Sep 17 00:00:00 2001
From: Gennady Pospelov <g.pospelov@fz-juelich.de>
Date: Tue, 3 May 2016 15:55:51 +0200
Subject: [PATCH] Mapper in ModelTuningDelegate makes fitting crash and thus he
 is removed (seems to be not necessary at all).

---
 .../Views/JobWidgets/ModelTuningDelegate.cpp       | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp b/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp
index 00cb1e507bc..608fc09af43 100644
--- a/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp
+++ b/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp
@@ -183,10 +183,16 @@ QWidget *ModelTuningDelegate::createEditor(QWidget *parent,
         m_contentLayout->addWidget(m_valueBox);
         m_contentLayout->addWidget(m_slider);
 
-        m_currentItem->mapper()->setOnValueChange(
-                      [this](){
-              m_valueBox->setValue(m_currentItem->value().toDouble());
-        }, this);
+        // FIXME CHECK
+        // This mapping seems to be necessary only in the case when ModelTuningDelegate is active,
+        // when item changes its value from outside. It never happens it seems, so mapper
+        // is not necessary.
+        // If one ourcomment code below, the time life of ModelTuningDelegate will make application
+        // crash. Check this again and remove commented.
+//        m_currentItem->mapper()->setOnValueChange(
+//                      [this](){
+//              m_valueBox->setValue(m_currentItem->value().toDouble());
+//        }, this);
 
         m_contentWidget->setLayout(m_contentLayout);
 
-- 
GitLab