diff --git a/GUI/View/PropertyEditor/PropertyEditorFactory.cpp b/GUI/View/PropertyEditor/PropertyEditorFactory.cpp
index 6f2824c4c776a24277280d90aea9fb36601ced44..2352f0b56713f6e6b84fc4590d657cc4b58695d3 100644
--- a/GUI/View/PropertyEditor/PropertyEditorFactory.cpp
+++ b/GUI/View/PropertyEditor/PropertyEditorFactory.cpp
@@ -70,7 +70,7 @@ QString GUI::View::PropertyEditorFactory::toString(const QModelIndex& index)
 
 QWidget* GUI::View::PropertyEditorFactory::CreateEditor(QObject* item, QWidget* parent)
 {
-    QWidget* result(nullptr);
+    CustomEditor* result(nullptr);
 
     if (FitDoubleItem* doubleItem = dynamic_cast<FitDoubleItem*>(item)) {
         // only Scientific SpinBoxes in Fit-Window
@@ -85,9 +85,8 @@ QWidget* GUI::View::PropertyEditorFactory::CreateEditor(QObject* item, QWidget*
     if (parent && result) {
         result->setParent(parent);
 
-        if (auto* cusEd = dynamic_cast<CustomEditor*>(result))
-            QObject::connect(cusEd, &CustomEditor::dataChanged,
-                             [=] { gSessionData->projectDocument.value()->setModified(); });
+        QObject::connect(result, &CustomEditor::dataChanged,
+                         [=] { gSessionData->projectDocument.value()->setModified(); });
     }
 
     return result;