From 9f8e032d92ac2366efee367a847e44f49b9fe1c0 Mon Sep 17 00:00:00 2001 From: asl Date: Fri, 14 Apr 2017 11:34:47 +0300 Subject: [PATCH] refs #1211: crash in two polylines creation --- src/CurveCreator/CurveCreator_TreeView.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/CurveCreator/CurveCreator_TreeView.cxx b/src/CurveCreator/CurveCreator_TreeView.cxx index 6a8ecec53..89f2606c3 100644 --- a/src/CurveCreator/CurveCreator_TreeView.cxx +++ b/src/CurveCreator/CurveCreator_TreeView.cxx @@ -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 }