From a8f19d979b5f8c3d38a069e7d949d87158690bef Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 27 Nov 2017 23:37:36 +0200 Subject: [PATCH] Fix bug with moving increment value down in dialog. --HG-- branch : develop --- src/app/valentina/xml/vpattern.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/app/valentina/xml/vpattern.cpp b/src/app/valentina/xml/vpattern.cpp index ffff375a5..7954e8f12 100644 --- a/src/app/valentina/xml/vpattern.cpp +++ b/src/app/valentina/xml/vpattern.cpp @@ -3337,8 +3337,7 @@ void VPattern::MoveUpIncrement(const QString &type, const QString &name) const QDomElement prSibling = node.previousSiblingElement(TagIncrement); if (not prSibling.isNull()) { - const QDomNodeList list = elementsByTagName(type); - list.at(0).insertBefore(node, prSibling); + elementsByTagName(type).at(0).insertBefore(node, prSibling); } } emit patternChanged(false); @@ -3353,8 +3352,7 @@ void VPattern::MoveDownIncrement(const QString &type, const QString &name) const QDomElement nextSibling = node.nextSiblingElement(TagIncrement); if (not nextSibling.isNull()) { - const QDomNodeList list = elementsByTagName(type); - list.at(0).insertAfter(node, nextSibling); + elementsByTagName(type).at(0).insertAfter(node, nextSibling); } } emit patternChanged(false); @@ -3751,7 +3749,7 @@ void VPattern::MoveUpPreviewCalculation(const QString &name) //--------------------------------------------------------------------------------------------------------------------- void VPattern::MoveDownIncrement(const QString &name) { - MoveDownIncrement(TagIncrement, name); + MoveDownIncrement(TagIncrements, name); } //---------------------------------------------------------------------------------------------------------------------