From fe67e8e57f423e1f9281dbcfbf908ffdd8a5c2c7 Mon Sep 17 00:00:00 2001 From: dismine Date: Sun, 15 Jun 2014 20:07:54 +0300 Subject: [PATCH] Undo add detail and add union details. --HG-- branch : feature --- src/app/tools/drawTools/vtoolsinglepoint.cpp | 21 +++--- src/app/tools/drawTools/vtoolsinglepoint.h | 2 +- src/app/tools/nodeDetails/vabstractnode.cpp | 15 +--- src/app/tools/vabstracttool.cpp | 21 +++--- src/app/tools/vabstracttool.h | 2 +- src/app/tools/vtooldetail.cpp | 22 +++--- src/app/tools/vtooldetail.h | 2 +- src/app/tools/vtooluniondetails.cpp | 28 +++---- src/app/undocommands/adddet.cpp | 77 ++++++++++++++++++++ src/app/undocommands/adddet.h | 54 ++++++++++++++ src/app/undocommands/adddetnode.cpp | 71 ++++++++++++++++++ src/app/undocommands/adddetnode.h | 50 +++++++++++++ src/app/undocommands/addtocalc.cpp | 3 + src/app/undocommands/adduniondetails.cpp | 77 ++++++++++++++++++++ src/app/undocommands/adduniondetails.h | 54 ++++++++++++++ src/app/undocommands/deltool.cpp | 2 + src/app/undocommands/movedetail.cpp | 3 + src/app/undocommands/movespline.cpp | 2 + src/app/undocommands/movesplinepath.cpp | 2 + src/app/undocommands/movespoint.cpp | 3 + src/app/undocommands/savedetailoptions.cpp | 2 + src/app/undocommands/savetooloptions.cpp | 2 + src/app/undocommands/undocommands.pri | 10 ++- 23 files changed, 469 insertions(+), 56 deletions(-) create mode 100644 src/app/undocommands/adddet.cpp create mode 100644 src/app/undocommands/adddet.h create mode 100644 src/app/undocommands/adddetnode.cpp create mode 100644 src/app/undocommands/adddetnode.h create mode 100644 src/app/undocommands/adduniondetails.cpp create mode 100644 src/app/undocommands/adduniondetails.h diff --git a/src/app/tools/drawTools/vtoolsinglepoint.cpp b/src/app/tools/drawTools/vtoolsinglepoint.cpp index 52d624d44..cfd526a6a 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.cpp +++ b/src/app/tools/drawTools/vtoolsinglepoint.cpp @@ -185,17 +185,20 @@ void VToolSinglePoint::decrementReferens() } //--------------------------------------------------------------------------------------------------------------------- -void VToolSinglePoint::DeleteTool() +void VToolSinglePoint::DeleteTool(bool ask) { - QMessageBox msgBox; - msgBox.setText(tr("Confirm the deletion.")); - msgBox.setInformativeText(tr("Do you really want delete?")); - msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); - msgBox.setDefaultButton(QMessageBox::Ok); - msgBox.setIcon(QMessageBox::Question); - if (msgBox.exec() == QMessageBox::Cancel) + if (ask) { - return; + QMessageBox msgBox; + msgBox.setText(tr("Confirm the deletion.")); + msgBox.setInformativeText(tr("Do you really want delete?")); + msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + msgBox.setDefaultButton(QMessageBox::Ok); + msgBox.setIcon(QMessageBox::Question); + if (msgBox.exec() == QMessageBox::Cancel) + { + return; + } } DeletePatternPiece *deletePP = new DeletePatternPiece(doc, nameActivDraw); diff --git a/src/app/tools/drawTools/vtoolsinglepoint.h b/src/app/tools/drawTools/vtoolsinglepoint.h index a36388202..78b7b0ebd 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.h +++ b/src/app/tools/drawTools/vtoolsinglepoint.h @@ -59,7 +59,7 @@ protected: virtual void RefreshDataInFile(); QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); virtual void decrementReferens(); - virtual void DeleteTool(); + virtual void DeleteTool(bool ask = true); virtual void SaveDialog(QDomElement &domElement); private: QString namePP; diff --git a/src/app/tools/nodeDetails/vabstractnode.cpp b/src/app/tools/nodeDetails/vabstractnode.cpp index 511f8217f..09f6e1da8 100644 --- a/src/app/tools/nodeDetails/vabstractnode.cpp +++ b/src/app/tools/nodeDetails/vabstractnode.cpp @@ -29,6 +29,8 @@ #include "vabstractnode.h" #include #include "../../xml/vpattern.h" +#include "../../undocommands/adddetnode.h" +#include "../../widgets/vapplication.h" const QString VAbstractNode::AttrIdObject = QStringLiteral("idObject"); const QString VAbstractNode::AttrIdTool = QStringLiteral("idTool"); @@ -74,17 +76,8 @@ void VAbstractNode::RestoreNode() */ void VAbstractNode::AddToModeling(const QDomElement &domElement) { - QDomElement modelingElement; - bool ok = doc->GetActivNodeElement(VPattern::TagModeling, modelingElement); - if (ok) - { - modelingElement.appendChild(domElement); - } - else - { - qCritical()<getUndoStack()->push(addNode); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/vabstracttool.cpp b/src/app/tools/vabstracttool.cpp index 81951fde2..0a06a78f8 100644 --- a/src/app/tools/vabstracttool.cpp +++ b/src/app/tools/vabstracttool.cpp @@ -242,17 +242,20 @@ QPointF VAbstractTool::addVector(const QPointF &p, const QPointF &p1, const QPoi * @brief DeleteTool full delete object form scene and file. * @param tool tool */ -void VAbstractTool::DeleteTool() +void VAbstractTool::DeleteTool(bool ask) { - QMessageBox msgBox; - msgBox.setText(tr("Confirm the deletion.")); - msgBox.setInformativeText(tr("Do you really want delete?")); - msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); - msgBox.setDefaultButton(QMessageBox::Ok); - msgBox.setIcon(QMessageBox::Question); - if (msgBox.exec() == QMessageBox::Cancel) + if (ask) { - return; + QMessageBox msgBox; + msgBox.setText(tr("Confirm the deletion.")); + msgBox.setInformativeText(tr("Do you really want delete?")); + msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); + msgBox.setDefaultButton(QMessageBox::Ok); + msgBox.setIcon(QMessageBox::Question); + if (msgBox.exec() == QMessageBox::Cancel) + { + return; + } } DelTool *delTool = new DelTool(doc, id); diff --git a/src/app/tools/vabstracttool.h b/src/app/tools/vabstracttool.h index 29d2bbf47..c29e6c587 100644 --- a/src/app/tools/vabstracttool.h +++ b/src/app/tools/vabstracttool.h @@ -145,7 +145,7 @@ protected: * @brief RemoveReferens decrement value of reference. */ virtual void RemoveReferens(){} - virtual void DeleteTool(); + virtual void DeleteTool(bool ask = true); Qt::PenStyle LineStyle(); private: Q_DISABLE_COPY(VAbstractTool) diff --git a/src/app/tools/vtooldetail.cpp b/src/app/tools/vtooldetail.cpp index 4e75fc3ea..b5b5d40d7 100644 --- a/src/app/tools/vtooldetail.cpp +++ b/src/app/tools/vtooldetail.cpp @@ -40,6 +40,7 @@ #include #include "../undocommands/savedetailoptions.h" #include "../undocommands/movedetail.h" +#include "../undocommands/adddet.h" const QString VToolDetail::TagName = QStringLiteral("detail"); const QString VToolDetail::TagNode = QStringLiteral("node"); @@ -123,7 +124,11 @@ VToolDetail::VToolDetail(VPattern *doc, VContainer *data, const quint32 &id, con this->setFlag(QGraphicsItem::ItemIsFocusable, true); if (typeCreation == Source::FromGui || typeCreation == Source::FromTool) { - AddToFile(); + AddToFile(); + if (typeCreation != Source::FromTool) + { + qApp->getUndoStack()->endMacro(); + } } } @@ -161,6 +166,7 @@ void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern SCASSERT(dialogTool != nullptr); VDetail detail = dialogTool->getDetails(); VDetail det; + qApp->getUndoStack()->beginMacro("add detail"); for (ptrdiff_t i = 0; i< detail.CountNode(); ++i) { quint32 id = 0; @@ -219,6 +225,7 @@ void VToolDetail::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPattern det.append(node); } det.setName(detail.getName()); + det.setWidth(detail.getWidth()); Create(0, det, scene, doc, data, Document::FullParse, Source::FromGui); } @@ -264,9 +271,9 @@ void VToolDetail::Create(const quint32 &_id, const VDetail &newDetail, VMainGrap /** * @brief Remove full delete detail. */ -void VToolDetail::Remove() +void VToolDetail::Remove(bool ask) { - DeleteTool(); + DeleteTool(ask); } //--------------------------------------------------------------------------------------------------------------------- @@ -323,12 +330,9 @@ void VToolDetail::AddToFile() AddNode(doc, domElement, detail.at(i)); } - QDomElement element; - bool ok = doc->GetActivNodeElement(VPattern::TagDetails, element); - if (ok) - { - element.appendChild(domElement); - } + AddDet *addDet = new AddDet(domElement, doc); + connect(addDet, &AddDet::NeedFullParsing, doc, &VPattern::NeedFullParsing); + qApp->getUndoStack()->push(addDet); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/vtooldetail.h b/src/app/tools/vtooldetail.h index f171d5f46..6af80a685 100644 --- a/src/app/tools/vtooldetail.h +++ b/src/app/tools/vtooldetail.h @@ -80,7 +80,7 @@ public: static const QString NodePoint; static const QString NodeSpline; static const QString NodeSplinePath; - void Remove(); + void Remove(bool ask); static void AddNode(VPattern *doc, QDomElement &domElement, const VNodeDetail &node); public slots: virtual void FullUpdateFromFile (); diff --git a/src/app/tools/vtooluniondetails.cpp b/src/app/tools/vtooluniondetails.cpp index feee7b427..f2f5dfe74 100644 --- a/src/app/tools/vtooluniondetails.cpp +++ b/src/app/tools/vtooluniondetails.cpp @@ -33,6 +33,7 @@ #include "../geometry/varc.h" #include "../geometry/vsplinepath.h" #include "../dialogs/tools/dialoguniondetails.h" +#include "../undocommands/adduniondetails.h" const QString VToolUnionDetails::TagName = QStringLiteral("tools"); const QString VToolUnionDetails::ToolType = QStringLiteral("unionDetails"); @@ -492,6 +493,7 @@ void VToolUnionDetails::Create(DialogTool *dialog, VMainGraphicsScene *scene, VP VDetail d2 = data->GetDetail(dialogTool->getD2()); quint32 indexD1 = static_cast(dialogTool->getIndexD1()); quint32 indexD2 = static_cast(dialogTool->getIndexD2()); + qApp->getUndoStack()->beginMacro("union details"); Create(0, d1, d2, dialogTool->getD1(), dialogTool->getD2(), indexD1, indexD2, scene, doc, data, Document::FullParse, Source::FromGui); } @@ -603,6 +605,7 @@ void VToolUnionDetails::Create(const quint32 _id, const VDetail &d1, const VDeta } while (i < d1.RemoveEdge(indexD1).CountNode()); newDetail.setName("Detail"); + newDetail.setWidth(d1.getWidth()); VToolDetail::Create(0, newDetail, scene, doc, data, parse, Source::FromTool); QHash* tools = doc->getTools(); SCASSERT(tools != nullptr); @@ -610,12 +613,14 @@ void VToolUnionDetails::Create(const quint32 _id, const VDetail &d1, const VDeta { VToolDetail *toolDet = qobject_cast(tools->value(d1id)); SCASSERT(toolDet != nullptr); - toolDet->Remove(); + bool ask = false; + toolDet->Remove(ask); } VToolDetail *toolDet = qobject_cast(tools->value(d2id)); SCASSERT(toolDet != nullptr); - toolDet->Remove(); + bool ask = false; + toolDet->Remove(ask); } else { @@ -645,6 +650,11 @@ void VToolUnionDetails::Create(const quint32 _id, const VDetail &d1, const VDeta } } while (igetUndoStack()->endMacro(); + } } //--------------------------------------------------------------------------------------------------------------------- @@ -896,15 +906,7 @@ QDomNode VToolUnionDetails::UpdateDetail(const QDomNode &domNode, const VDetail */ void VToolUnionDetails::AddToModeling(const QDomElement &domElement) { - QDomElement modelingElement; - bool ok = doc->GetActivNodeElement(VPattern::TagModeling, modelingElement); - if (ok) - { - modelingElement.appendChild(domElement); - } - else - { - qCritical()<getUndoStack()->push(addUnion); } diff --git a/src/app/undocommands/adddet.cpp b/src/app/undocommands/adddet.cpp new file mode 100644 index 000000000..d927f3f47 --- /dev/null +++ b/src/app/undocommands/adddet.cpp @@ -0,0 +1,77 @@ +/************************************************************************ + ** + ** @file adddet.cpp + ** @author Roman Telezhynskyi + ** @date 15 6, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2014 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "adddet.h" +#include "../xml/vpattern.h" + +//--------------------------------------------------------------------------------------------------------------------- +AddDet::AddDet(const QDomElement &xml, VPattern *doc, QUndoCommand *parent) + : QObject(), QUndoCommand(parent), xml(xml), doc(doc), redoFlag(false) +{ + setText(tr("Add detail")); +} + +//--------------------------------------------------------------------------------------------------------------------- +AddDet::~AddDet() +{} + +//--------------------------------------------------------------------------------------------------------------------- +void AddDet::undo() +{ + QDomElement element; + if (doc->GetActivNodeElement(VPattern::TagDetails, element)) + { + element.removeChild(xml); + } + else + { + qDebug()<<"Can't find tag"<GetActivNodeElement(VPattern::TagDetails, element)) + { + element.appendChild(xml); + } + else + { + qDebug()<<"Can't find tag"< + ** @date 15 6, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2014 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef ADDDET_H +#define ADDDET_H + +#include +#include + +class VPattern; + +class AddDet : public QObject, public QUndoCommand +{ + Q_OBJECT +public: + AddDet(const QDomElement &xml, VPattern *doc, QUndoCommand *parent = 0); + virtual ~AddDet(); + virtual void undo(); + virtual void redo(); +signals: + void NeedFullParsing(); +private: + Q_DISABLE_COPY(AddDet) + const QDomElement xml; + VPattern *doc; + bool redoFlag; +}; + +#endif // ADDDET_H diff --git a/src/app/undocommands/adddetnode.cpp b/src/app/undocommands/adddetnode.cpp new file mode 100644 index 000000000..8221162de --- /dev/null +++ b/src/app/undocommands/adddetnode.cpp @@ -0,0 +1,71 @@ +/************************************************************************ + ** + ** @file adddetnode.cpp + ** @author Roman Telezhynskyi + ** @date 15 6, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2014 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "adddetnode.h" +#include "../xml/vpattern.h" + +//--------------------------------------------------------------------------------------------------------------------- +AddDetNode::AddDetNode(const QDomElement &xml, VPattern *doc, QUndoCommand *parent) + : QUndoCommand(parent), xml(xml), doc(doc) +{ + setText(QObject::tr("Add node")); +} + +//--------------------------------------------------------------------------------------------------------------------- +AddDetNode::~AddDetNode() +{} + +//--------------------------------------------------------------------------------------------------------------------- +void AddDetNode::undo() +{ + QDomElement modelingElement; + if (doc->GetActivNodeElement(VPattern::TagModeling, modelingElement)) + { + modelingElement.removeChild(xml); + } + else + { + qDebug()<<"Can't find tag"<GetActivNodeElement(VPattern::TagModeling, modelingElement)) + { + modelingElement.appendChild(xml); + } + else + { + qDebug()<<"Can't find tag"< + ** @date 15 6, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2014 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef ADDDETNODE_H +#define ADDDETNODE_H + +#include +#include + +class VPattern; + +class AddDetNode : public QUndoCommand +{ +public: + AddDetNode(const QDomElement &xml, VPattern *doc, QUndoCommand *parent = 0); + virtual ~AddDetNode(); + virtual void undo(); + virtual void redo(); +private: + Q_DISABLE_COPY(AddDetNode) + const QDomElement xml; + VPattern *doc; +}; + +#endif // ADDDETNODE_H diff --git a/src/app/undocommands/addtocalc.cpp b/src/app/undocommands/addtocalc.cpp index c8d9b3dd3..62baf2062 100644 --- a/src/app/undocommands/addtocalc.cpp +++ b/src/app/undocommands/addtocalc.cpp @@ -59,6 +59,7 @@ void AddToCalc::undo() else { qDebug()<<"Can't find tag Calculation"<< Q_FUNC_INFO; + return; } emit NeedFullParsing(); } @@ -87,12 +88,14 @@ void AddToCalc::redo() else { qDebug()<<"Can not find the element after which you want to insert."<< Q_FUNC_INFO; + return; } } } else { qDebug()<<"Can't find tag Calculation"<< Q_FUNC_INFO; + return; } if (redoFlag) { diff --git a/src/app/undocommands/adduniondetails.cpp b/src/app/undocommands/adduniondetails.cpp new file mode 100644 index 000000000..3dc577bb3 --- /dev/null +++ b/src/app/undocommands/adduniondetails.cpp @@ -0,0 +1,77 @@ +/************************************************************************ + ** + ** @file adduniondetails.cpp + ** @author Roman Telezhynskyi + ** @date 15 6, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2014 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#include "adduniondetails.h" +#include "../xml/vpattern.h" + +//--------------------------------------------------------------------------------------------------------------------- +AddUnionDetails::AddUnionDetails(const QDomElement &xml, VPattern *doc, QUndoCommand *parent) + : QObject(), QUndoCommand(parent), xml(xml), doc(doc), redoFlag(false) +{ + setText(tr("Add union details")); +} + +//--------------------------------------------------------------------------------------------------------------------- +AddUnionDetails::~AddUnionDetails() +{} + +//--------------------------------------------------------------------------------------------------------------------- +void AddUnionDetails::undo() +{ + QDomElement modelingElement; + if (doc->GetActivNodeElement(VPattern::TagModeling, modelingElement)) + { + modelingElement.removeChild(xml); + } + else + { + qDebug()<<"Can't find tag"<GetActivNodeElement(VPattern::TagModeling, modelingElement)) + { + modelingElement.appendChild(xml); + } + else + { + qDebug()<<"Can't find tag"< + ** @date 15 6, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2014 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + +#ifndef ADDUNIONDETAILS_H +#define ADDUNIONDETAILS_H + +#include +#include + +class VPattern; + +class AddUnionDetails : public QObject, public QUndoCommand +{ + Q_OBJECT +public: + AddUnionDetails(const QDomElement &xml, VPattern *doc, QUndoCommand *parent = 0); + virtual ~AddUnionDetails(); + virtual void undo(); + virtual void redo(); +signals: + void NeedFullParsing(); +private: + Q_DISABLE_COPY(AddUnionDetails) + const QDomElement xml; + VPattern *doc; + bool redoFlag; +}; + +#endif // ADDUNIONDETAILS_H diff --git a/src/app/undocommands/deltool.cpp b/src/app/undocommands/deltool.cpp index 095ca553f..d6b2a6c80 100644 --- a/src/app/undocommands/deltool.cpp +++ b/src/app/undocommands/deltool.cpp @@ -45,6 +45,7 @@ DelTool::DelTool(VPattern *doc, quint32 id, QUndoCommand *parent) else { qDebug()<<"Can't get tool by id = "<