From bcceeab0892ced8a671f9aebb9bbef7fda3cea52 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 10 Apr 2021 15:54:11 +0300 Subject: [PATCH] Fix crash. Closing pattern while refreshing pieces causing the app to crash. --- src/app/valentina/xml/vpattern.cpp | 7 +++++++ src/app/valentina/xml/vpattern.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index ebc31cc2b..7ff6d238d 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -690,6 +690,13 @@ void VPattern::customEvent(QEvent *event) } } +//--------------------------------------------------------------------------------------------------------------------- +void VPattern::Clear() +{ + m_parsing = true; + VAbstractPattern::Clear(); +} + //--------------------------------------------------------------------------------------------------------------------- VNodeDetail VPattern::ParseDetailNode(const QDomElement &domElement) const { diff --git a/src/app/valentina/xml/vpattern.h b/src/app/valentina/xml/vpattern.h index 51cc84c9b..97c182852 100644 --- a/src/app/valentina/xml/vpattern.h +++ b/src/app/valentina/xml/vpattern.h @@ -98,6 +98,7 @@ public: virtual QString GenerateLabel(const LabelType &type, const QString &reservedName = QString())const override; virtual QString GenerateSuffix() const override; + virtual void Clear() override; bool IsReadOnly() const; void SetReadOnly(bool rOnly);