Salome HOME
54519: [TC-9.3.0]: SIGSEGV during exit if dimensions are editing
[modules/geom.git] / src / CurveCreator / CurveCreator_TreeView.cxx
index 148fabaab4d32a1fb220a881cbeb7511b90ac79d..b9b62d909d8ef9142e99fac465b9ef2508f6f83a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2019  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -212,9 +212,13 @@ int CurveCreator_TreeViewModel::getPoint( const QModelIndex& theIndx ) const
 
 void CurveCreator_TreeViewModel::setCurve( CurveCreator_ICurve* theCurve )
 {
-  myCurve = theCurve;
 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+  myCurve = theCurve;
   reset();
+#else
+  beginResetModel();
+  myCurve = theCurve;
+  endResetModel();
 #endif
 }