diff --git a/Valentina.pro b/Valentina.pro
index ee7b1ec2b..c05bf37e1 100644
--- a/Valentina.pro
+++ b/Valentina.pro
@@ -97,7 +97,10 @@ SOURCES += main.cpp\
exception/vexceptionemptyparameter.cpp \
exception/vexceptionobjecterror.cpp \
widgets/vapplication.cpp \
- exception/vexceptionuniqueid.cpp
+ exception/vexceptionuniqueid.cpp \
+ tools/drawTools/vtoolheight.cpp \
+ tools/modelingTools/vmodelingheight.cpp \
+ dialogs/dialogheight.cpp
HEADERS += mainwindow.h \
widgets/vmaingraphicsscene.h \
@@ -188,7 +191,10 @@ HEADERS += mainwindow.h \
exception/vexceptionemptyparameter.h \
exception/vexceptionobjecterror.h \
widgets/vapplication.h \
- exception/vexceptionuniqueid.h
+ exception/vexceptionuniqueid.h \
+ tools/drawTools/vtoolheight.h \
+ tools/modelingTools/vmodelingheight.h \
+ dialogs/dialogheight.h
FORMS += mainwindow.ui \
dialogs/dialogsinglepoint.ui \
@@ -206,7 +212,8 @@ FORMS += mainwindow.ui \
dialogs/dialoghistory.ui \
dialogs/dialogpointofcontact.ui \
dialogs/dialogdetail.ui \
- tablewindow.ui
+ tablewindow.ui \
+ dialogs/dialogheight.ui
RESOURCES += \
icon.qrc \
diff --git a/cursor.qrc b/cursor.qrc
index ece04dd88..b38ff9e43 100644
--- a/cursor.qrc
+++ b/cursor.qrc
@@ -12,5 +12,6 @@
cursor/splinepath_cursor.png
cursor/pointcontact_cursor.png
cursor/new_detail_cursor.png
+ cursor/height_cursor.png
diff --git a/cursor/height_cursor.png b/cursor/height_cursor.png
new file mode 100644
index 000000000..05da2a5ae
Binary files /dev/null and b/cursor/height_cursor.png differ
diff --git a/dialogs/dialogendline.h b/dialogs/dialogendline.h
index 5053e6462..b07701169 100644
--- a/dialogs/dialogendline.h
+++ b/dialogs/dialogendline.h
@@ -30,8 +30,7 @@ namespace Ui {
class DialogEndLine;
}
-class DialogEndLine : public DialogTool
-{
+class DialogEndLine : public DialogTool{
Q_OBJECT
public:
explicit DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation,
diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp
new file mode 100644
index 000000000..dc1002147
--- /dev/null
+++ b/dialogs/dialogheight.cpp
@@ -0,0 +1,122 @@
+#include "dialogheight.h"
+#include "ui_dialogheight.h"
+
+DialogHeight::DialogHeight(const VContainer *data, Draw::Draws mode, QWidget *parent) :
+ DialogTool(data, mode, parent), ui(new Ui::DialogHeight), number(0), pointName(QString()),
+ typeLine(QString()), basePointId(0), p1LineId(0), p2LineId(0){
+ ui->setupUi(this);
+ labelEditNamePoint = ui->labelEditNamePoint;
+ flagFormula = true;
+ bOk = ui->buttonBox->button(QDialogButtonBox::Ok);
+ connect(bOk, &QPushButton::clicked, this, &DialogHeight::DialogAccepted);
+ flagName = false;
+ CheckState();
+ QPushButton *bCansel = ui->buttonBox->button(QDialogButtonBox::Cancel);
+ connect(bCansel, &QPushButton::clicked, this, &DialogHeight::DialogRejected);
+ FillComboBoxPoints(ui->comboBoxBasePoint);
+ FillComboBoxPoints(ui->comboBoxP1Line);
+ FillComboBoxPoints(ui->comboBoxP2Line);
+ FillComboBoxTypeLine(ui->comboBoxLineType);
+ connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogHeight::NamePointChanged);
+}
+
+DialogHeight::~DialogHeight(){
+ delete ui;
+}
+
+QString DialogHeight::getPointName() const{
+ return pointName;
+}
+
+void DialogHeight::setPointName(const QString &value){
+ pointName = value;
+ ui->lineEditNamePoint->setText(pointName);
+}
+
+QString DialogHeight::getTypeLine() const{
+ return typeLine;
+}
+
+void DialogHeight::setTypeLine(const QString &value){
+ typeLine = value;
+ SetupTypeLine(ui->comboBoxLineType, value);
+}
+
+qint64 DialogHeight::getBasePointId() const{
+ return basePointId;
+}
+
+void DialogHeight::setBasePointId(const qint64 &value, const qint64 &id){
+ basePointId = value;
+ setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id);
+}
+
+qint64 DialogHeight::getP1LineId() const{
+ return p1LineId;
+}
+
+void DialogHeight::setP1LineId(const qint64 &value, const qint64 &id){
+ p1LineId = value;
+ setCurrentPointId(ui->comboBoxP1Line, p1LineId, value, id);
+}
+
+qint64 DialogHeight::getP2LineId() const{
+ return p2LineId;
+}
+
+void DialogHeight::setP2LineId(const qint64 &value, const qint64 &id){
+ p2LineId = value;
+ setCurrentPointId(ui->comboBoxP2Line, p2LineId, value, id);
+}
+
+void DialogHeight::ChoosedObject(qint64 id, Scene::Scenes type){
+ if(idDetail == 0 && mode == Draw::Modeling){
+ if(type == Scene::Detail){
+ idDetail = id;
+ return;
+ }
+ }
+ if(mode == Draw::Modeling){
+ if(!CheckObject(id)){
+ return;
+ }
+ }
+ if(type == Scene::Point){
+ VPointF point;
+ if(mode == Draw::Calculation){
+ point = data->GetPoint(id);
+ } else {
+ point = data->GetModelingPoint(id);
+ }
+ switch(number){
+ case(0):
+ ChangeCurrentText(ui->comboBoxBasePoint, point.name());
+ number++;
+ emit ToolTip(tr("Select first point of line"));
+ break;
+ case(1):
+ ChangeCurrentText(ui->comboBoxP1Line, point.name());
+ number++;
+ emit ToolTip(tr("Select second point of line"));
+ break;
+ case(2):
+ ChangeCurrentText(ui->comboBoxP2Line, point.name());
+ number = 0;
+ emit ToolTip(tr(""));
+ if(!isInitialized){
+ this->show();
+ }
+ break;
+ }
+ }
+}
+
+void DialogHeight::DialogAccepted(){
+ pointName = ui->lineEditNamePoint->text();
+ typeLine = GetTypeLine(ui->comboBoxLineType);
+ basePointId = getCurrentPointId(ui->comboBoxBasePoint);
+ p1LineId = getCurrentPointId(ui->comboBoxP1Line);
+ p2LineId = getCurrentPointId(ui->comboBoxP2Line);
+ emit DialogClosed(QDialog::Accepted);
+}
+
diff --git a/dialogs/dialogheight.h b/dialogs/dialogheight.h
new file mode 100644
index 000000000..b4e4c05b6
--- /dev/null
+++ b/dialogs/dialogheight.h
@@ -0,0 +1,40 @@
+#ifndef DIALOGHEIGHT_H
+#define DIALOGHEIGHT_H
+
+#include "dialogtool.h"
+
+namespace Ui {
+class DialogHeight;
+}
+
+class DialogHeight : public DialogTool{
+ Q_OBJECT
+public:
+ explicit DialogHeight(const VContainer *data, Draw::Draws mode = Draw::Calculation,
+ QWidget *parent = 0);
+ ~DialogHeight();
+ QString getPointName() const;
+ void setPointName(const QString &value);
+ QString getTypeLine() const;
+ void setTypeLine(const QString &value);
+ qint64 getBasePointId() const;
+ void setBasePointId(const qint64 &value, const qint64 &id);
+ qint64 getP1LineId() const;
+ void setP1LineId(const qint64 &value, const qint64 &id);
+ qint64 getP2LineId() const;
+ void setP2LineId(const qint64 &value, const qint64 &id);
+public slots:
+ virtual void ChoosedObject(qint64 id, Scene::Scenes type);
+ virtual void DialogAccepted();
+private:
+ Q_DISABLE_COPY(DialogHeight)
+ Ui::DialogHeight *ui;
+ qint32 number;
+ QString pointName;
+ QString typeLine;
+ qint64 basePointId;
+ qint64 p1LineId;
+ qint64 p2LineId;
+};
+
+#endif // DIALOGHEIGHT_H
diff --git a/dialogs/dialogheight.ui b/dialogs/dialogheight.ui
new file mode 100644
index 000000000..bfb3dab67
--- /dev/null
+++ b/dialogs/dialogheight.ui
@@ -0,0 +1,211 @@
+
+
+ DialogHeight
+
+
+
+ 0
+ 0
+ 247
+ 220
+
+
+
+ Dialog
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 255
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 255
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 159
+ 158
+ 158
+
+
+
+
+
+
+
+ Name new point
+
+
+
+ -
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Base point
+
+
+
+ -
+
+
+ First point of line
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ First point of line
+
+
+
+ -
+
+
+ First point of line
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+ Second point of line
+
+
+
+ -
+
+
+ First point of line
+
+
+
+
+
+ -
+
+
-
+
+
+ Type line
+
+
+
+ -
+
+
+ Show line from first point to our point
+
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+ QDialogButtonBox::Cancel|QDialogButtonBox::Ok
+
+
+
+
+
+
+
+
+ buttonBox
+ accepted()
+ DialogHeight
+ accept()
+
+
+ 248
+ 254
+
+
+ 157
+ 274
+
+
+
+
+ buttonBox
+ rejected()
+ DialogHeight
+ reject()
+
+
+ 316
+ 260
+
+
+ 286
+ 274
+
+
+
+
+
diff --git a/dialogs/dialoghistory.cpp b/dialogs/dialoghistory.cpp
index 8e59671a3..d1b19544a 100644
--- a/dialogs/dialoghistory.cpp
+++ b/dialogs/dialoghistory.cpp
@@ -250,6 +250,20 @@ QString DialogHistory::Record(const VToolRecord &tool){
data->GetPoint(secondPointId).name(),
data->GetPoint(tool.getId()).name());
break;
+ case Tool::Height:{
+ qint64 p1LineId = 0;
+ qint64 p2LineId = 0;
+ domElement = doc->elementById(QString().setNum(tool.getId()));
+ if(domElement.isElement()){
+ basePointId = domElement.attribute("basePoint", "").toLongLong();
+ p1LineId = domElement.attribute("p1Line", "").toLongLong();
+ p2LineId = domElement.attribute("p2Line", "").toLongLong();
+ }
+ record = QString(tr("Point of perpendical from point %1 to line %2_%3")).arg(data->GetPoint(basePointId).name(),
+ data->GetPoint(p1LineId).name(),
+ data->GetPoint(p2LineId).name());
+ break;
+ }
default:
qWarning()<
findText(value);
if(index != -1){
box->setCurrentIndex(index);
+ } else {
+ qWarning()<
icon/32x32/new_detail.png
icon/32x32/layout.png
icon/16x16/mirror.png
+ icon/32x32/height.png
diff --git a/icon/32x32/height.png b/icon/32x32/height.png
new file mode 100644
index 000000000..c44de68bc
Binary files /dev/null and b/icon/32x32/height.png differ
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 19ae78c59..7befade91 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -44,10 +44,10 @@ MainWindow::MainWindow(QWidget *parent) :
dialogAlongLine(QSharedPointer()),
dialogShoulderPoint(QSharedPointer()), dialogNormal(QSharedPointer()),
dialogBisector(QSharedPointer()),
- dialogLineIntersect(QSharedPointer()),
- dialogSpline(QSharedPointer()),
+ dialogLineIntersect(QSharedPointer()), dialogSpline(QSharedPointer()),
dialogArc(QSharedPointer()), dialogSplinePath(QSharedPointer()),
- dialogPointOfContact(QSharedPointer()), dialogDetail(QSharedPointer()),
+ dialogPointOfContact(QSharedPointer()),
+ dialogDetail(QSharedPointer()), dialogHeight(QSharedPointer()),
dialogHistory(0), doc(0), data(0), comboBoxDraws(0), fileName(QString()), changeInFile(false),
mode(Draw::Calculation){
ui->setupUi(this);
@@ -91,6 +91,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->toolButtonSplinePath, &QToolButton::clicked, this, &MainWindow::ToolSplinePath);
connect(ui->toolButtonPointOfContact, &QToolButton::clicked, this, &MainWindow::ToolPointOfContact);
connect(ui->toolButtonNewDetail, &QToolButton::clicked, this, &MainWindow::ToolDetail);
+ connect(ui->toolButtonHeight, &QToolButton::clicked, this, &MainWindow::ToolHeight);
data = new VContainer;
@@ -463,6 +464,23 @@ void MainWindow::ClosedDialogDetail(int result){
ArrowTool();
}
+void MainWindow::ToolHeight(bool checked){
+ SetToolButton(checked, Tool::Height, ":/cursor/height_cursor.png", tr("Select base point"),
+ dialogHeight, &MainWindow::ClosedDialogHeight);
+}
+
+void MainWindow::ClosedDialogHeight(int result){
+ if(result == QDialog::Accepted){
+ if(mode == Draw::Calculation){
+ VToolHeight::Create(dialogHeight, currentScene, doc, data);
+ } else {
+ VModelingHeight *point = VModelingHeight::Create(dialogHeight, doc, data);
+ AddToolToDetail(point, point->getId(), Tool::Height, dialogHeight->getIdDetail());
+ }
+ }
+ ArrowTool();
+}
+
void MainWindow::About(){
QMessageBox::about(this, tr("About Valentina"), tr("Valentina v.0.1.0"));
}
@@ -616,88 +634,91 @@ void MainWindow::mouseMove(QPointF scenePos){
}
void MainWindow::CanselTool(){
- switch( tool )
- {
- case Tool::ArrowTool:
- ui->actionArrowTool->setChecked(false);
- helpLabel->setText("");
- break;
- case Tool::SinglePointTool:
- //Nothing to do here because we can't create this tool from main window.
- break;
- case Tool::EndLineTool:
- dialogEndLine.clear();
- ui->toolButtonEndLine->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::LineTool:
- dialogLine.clear();
- ui->toolButtonLine->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearFocus();
- break;
- case Tool::AlongLineTool:
- dialogAlongLine.clear();
- ui->toolButtonAlongLine->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::ShoulderPointTool:
- dialogShoulderPoint.clear();
- ui->toolButtonShoulderPoint->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::NormalTool:
- dialogNormal.clear();
- ui->toolButtonNormal->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::BisectorTool:
- dialogBisector.clear();
- ui->toolButtonBisector->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::LineIntersectTool:
- dialogLineIntersect.clear();
- ui->toolButtonLineIntersect->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::SplineTool:
- dialogSpline.clear();
- ui->toolButtonSpline->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::ArcTool:
- dialogArc.clear();
- ui->toolButtonArc->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::SplinePathTool:
- dialogSplinePath.clear();
- ui->toolButtonSplinePath->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::PointOfContact:
- dialogPointOfContact.clear();
- ui->toolButtonPointOfContact->setChecked(false);
- currentScene->setFocus(Qt::OtherFocusReason);
- currentScene->clearSelection();
- break;
- case Tool::Detail:
- dialogDetail.clear();
- ui->toolButtonNewDetail->setChecked(false);
- break;
- default:
- qWarning()<<"Get wrong tool type. Ignore.";
- break;
+ switch( tool ){
+ case Tool::ArrowTool:
+ ui->actionArrowTool->setChecked(false);
+ helpLabel->setText("");
+ break;
+ case Tool::SinglePointTool:
+ //Nothing to do here because we can't create this tool from main window.
+ break;
+ case Tool::EndLineTool:
+ dialogEndLine.clear();
+ ui->toolButtonEndLine->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::LineTool:
+ dialogLine.clear();
+ ui->toolButtonLine->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearFocus();
+ break;
+ case Tool::AlongLineTool:
+ dialogAlongLine.clear();
+ ui->toolButtonAlongLine->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::ShoulderPointTool:
+ dialogShoulderPoint.clear();
+ ui->toolButtonShoulderPoint->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::NormalTool:
+ dialogNormal.clear();
+ ui->toolButtonNormal->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::BisectorTool:
+ dialogBisector.clear();
+ ui->toolButtonBisector->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::LineIntersectTool:
+ dialogLineIntersect.clear();
+ ui->toolButtonLineIntersect->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::SplineTool:
+ dialogSpline.clear();
+ ui->toolButtonSpline->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::ArcTool:
+ dialogArc.clear();
+ ui->toolButtonArc->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::SplinePathTool:
+ dialogSplinePath.clear();
+ ui->toolButtonSplinePath->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::PointOfContact:
+ dialogPointOfContact.clear();
+ ui->toolButtonPointOfContact->setChecked(false);
+ currentScene->setFocus(Qt::OtherFocusReason);
+ currentScene->clearSelection();
+ break;
+ case Tool::Detail:
+ dialogDetail.clear();
+ ui->toolButtonNewDetail->setChecked(false);
+ break;
+ case Tool::Height:
+ dialogHeight.clear();
+ ui->toolButtonHeight->setChecked(false);
+ break;
+ default:
+ qWarning()<<"Get wrong tool type. Ignore.";
+ break;
}
}
@@ -935,6 +956,7 @@ void MainWindow::SetEnableTool(bool enable){
ui->toolButtonSplinePath->setEnabled(enable);
ui->toolButtonPointOfContact->setEnabled(enable);
ui->toolButtonNewDetail->setEnabled(enable);
+ ui->toolButtonHeight->setEnabled(enable);
}
void MainWindow::MinimumScrollBar(){
diff --git a/mainwindow.h b/mainwindow.h
index 3d55ab212..844052539 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -80,6 +80,7 @@ public slots:
void ToolSplinePath(bool checked);
void ToolPointOfContact(bool checked);
void ToolDetail(bool checked);
+ void ToolHeight(bool checked);
void ClosedDialogEndLine(int result);
void ClosedDialogLine(int result);
void ClosedDialogAlongLine(int result);
@@ -92,6 +93,7 @@ public slots:
void ClosedDialogSplinePath(int result);
void ClosedDialogPointOfContact(int result);
void ClosedDialogDetail(int result);
+ void ClosedDialogHeight(int result);
void About();
void AboutQt();
void ShowToolTip(const QString &toolTip);
@@ -135,6 +137,7 @@ private:
QSharedPointer dialogSplinePath;
QSharedPointer dialogPointOfContact;
QSharedPointer dialogDetail;
+ QSharedPointer dialogHeight;
DialogHistory *dialogHistory;
VDomDocument *doc;
VContainer *data;
diff --git a/mainwindow.ui b/mainwindow.ui
index b842a4655..0e9a0df8b 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -48,7 +48,7 @@
0
0
150
- 104
+ 150
@@ -64,20 +64,20 @@
Point
- -
-
+
-
+
false
- Tool point of normal.
+ Tool point on the end line.
...
- :/icon/32x32/normal.png:/icon/32x32/normal.png
+ :/icon/32x32/segment.png:/icon/32x32/segment.png
@@ -116,46 +116,20 @@
- -
-
+
-
+
false
- Tool point on the end line.
+ Tool point of contact.
...
- :/icon/32x32/segment.png:/icon/32x32/segment.png
-
-
-
- 32
- 32
-
-
-
- true
-
-
-
- -
-
-
- false
-
-
- Tool point along line.
-
-
- ...
-
-
-
- :/icon/32x32/along_line.png:/icon/32x32/along_line.png
+ :/icon/32x32/point_of_contact.png:/icon/32x32/point_of_contact.png
@@ -194,20 +168,72 @@
- -
-
+
-
+
false
- Tool point of contact.
+ Tool point of normal.
...
- :/icon/32x32/point_of_contact.png:/icon/32x32/point_of_contact.png
+ :/icon/32x32/normal.png:/icon/32x32/normal.png
+
+
+
+ 32
+ 32
+
+
+
+ true
+
+
+
+ -
+
+
+ false
+
+
+ Tool point along line.
+
+
+ ...
+
+
+
+ :/icon/32x32/along_line.png:/icon/32x32/along_line.png
+
+
+
+ 32
+ 32
+
+
+
+ true
+
+
+
+ -
+
+
+ false
+
+
+ Tool point of height.
+
+
+ ...
+
+
+
+ :/icon/32x32/height.png:/icon/32x32/height.png
diff --git a/options.h b/options.h
index 1d04de588..28b99f2d9 100644
--- a/options.h
+++ b/options.h
@@ -55,7 +55,8 @@ enum Tool {ArrowTool,
NodePoint,
NodeArc,
NodeSpline,
- NodeSplinePath
+ NodeSplinePath,
+ Height
};
Q_DECLARE_FLAGS(Tools, Tool)
diff --git a/tools/drawTools/drawtools.h b/tools/drawTools/drawtools.h
index 0d2c5b613..58fcbaf08 100644
--- a/tools/drawTools/drawtools.h
+++ b/tools/drawTools/drawtools.h
@@ -34,5 +34,6 @@
#include "vtoolsinglepoint.h"
#include "vtoolspline.h"
#include "vtoolsplinepath.h"
+#include "vtoolheight.h"
#endif // DRAWTOOLS_H
diff --git a/tools/drawTools/vdrawtool.cpp b/tools/drawTools/vdrawtool.cpp
index 197d800b9..0e622413b 100644
--- a/tools/drawTools/vdrawtool.cpp
+++ b/tools/drawTools/vdrawtool.cpp
@@ -25,7 +25,7 @@
qreal VDrawTool::factor = 1;
VDrawTool::VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent) :
- VAbstractTool(doc, data, id, parent), ignoreContextMenuEvent(false),
+ VAbstractTool(doc, data, id, parent), ignoreContextMenuEvent(false), ignoreFullUpdate(false),
nameActivDraw(doc->GetNameActivDraw()){
connect(this->doc, &VDomDocument::ChangedActivDraw, this, &VDrawTool::ChangedActivDraw);
connect(this->doc, &VDomDocument::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw);
diff --git a/tools/drawTools/vdrawtool.h b/tools/drawTools/vdrawtool.h
index 91a7a4527..4ef092514 100644
--- a/tools/drawTools/vdrawtool.h
+++ b/tools/drawTools/vdrawtool.h
@@ -43,6 +43,7 @@ signals:
void RemoveTool(QGraphicsItem *tool);
protected:
bool ignoreContextMenuEvent;
+ bool ignoreFullUpdate;
QString nameActivDraw;
static qreal factor;
void AddToCalculation(const QDomElement &domElement);
@@ -67,11 +68,12 @@ protected:
if(selectedAction == actionOption){
dialog = QSharedPointer