diff --git a/src/app/dialogs/tools/dialogdetail.cpp b/src/app/dialogs/tools/dialogdetail.cpp index 3fb553255..5db75df26 100644 --- a/src/app/dialogs/tools/dialogdetail.cpp +++ b/src/app/dialogs/tools/dialogdetail.cpp @@ -423,13 +423,3 @@ void DialogDetail::DeleteItem() ValidObjects(false); } } - - -//--------------------------------------------------------------------------------------------------------------------- -void DialogDetail::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} diff --git a/src/app/dialogs/tools/dialogdetail.h b/src/app/dialogs/tools/dialogdetail.h index a3718d520..be864d9d2 100644 --- a/src/app/dialogs/tools/dialogdetail.h +++ b/src/app/dialogs/tools/dialogdetail.h @@ -54,7 +54,6 @@ public slots: void ClickedReverse(bool checked); void ObjectChanged(int row); void DeleteItem(); - virtual void UpdateList(); protected: /** * @brief SaveData Put dialog data in local variables diff --git a/src/app/dialogs/tools/dialogendline.cpp b/src/app/dialogs/tools/dialogendline.cpp index 0b04561b4..5bff42f5e 100644 --- a/src/app/dialogs/tools/dialogendline.cpp +++ b/src/app/dialogs/tools/dialogendline.cpp @@ -34,6 +34,7 @@ #include "../../visualization/vistoolendline.h" #include "../../widgets/vmaingraphicsscene.h" #include "../../tools/vabstracttool.h" +#include "dialogeditwrongformula.h" #include //--------------------------------------------------------------------------------------------------------------------- @@ -47,7 +48,6 @@ DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWid formulaLength(QString()), formulaAngle(QString()), formulaBaseHeight(0), formulaBaseHeightAngle(0), line(nullptr) { ui->setupUi(this); - InitVariables(ui); InitFormulaUI(ui); ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel)); labelEditNamePoint = ui->labelEditNamePoint; @@ -65,8 +65,8 @@ DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWid FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics()); FillComboBoxLineColors(ui->comboBoxLineColor); - connect(ui->toolButtonPutHereLength, &QPushButton::clicked, this, &DialogEndLine::PutHere); - connect(ui->toolButtonPutHereAngle, &QPushButton::clicked, this, &DialogEndLine::PutAngle); + connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogEndLine::FXLength); + connect(ui->toolButtonExprAngle, &QPushButton::clicked, this, &DialogEndLine::FXAngle); connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogEndLine::NamePointChanged); @@ -81,15 +81,6 @@ DialogEndLine::DialogEndLine(const VContainer *data, const quint32 &toolId, QWid line = new VisToolEndLine(data); } -//--------------------------------------------------------------------------------------------------------------------- -/** - * @brief PutAngle put variable into formula of angle - */ -void DialogEndLine::PutAngle() -{ - PutValHere(ui->plainTextEditAngle, ui->listWidget); -} - //--------------------------------------------------------------------------------------------------------------------- /** * @brief EvalAngle calculate value of angle @@ -127,6 +118,32 @@ void DialogEndLine::DeployAngleTextEdit() DeployFormula(ui->plainTextEditAngle, ui->pushButtonGrowLengthAngle, formulaBaseHeightAngle); } +//--------------------------------------------------------------------------------------------------------------------- +void DialogEndLine::FXAngle() +{ + DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this); + dialog->setWindowTitle(tr("Edit angle")); + dialog->SetFormula(GetAngle()); + if (dialog->exec() == QDialog::Accepted) + { + SetAngle(dialog->GetFormula()); + } + delete dialog; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogEndLine::FXLength() +{ + DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, this); + dialog->setWindowTitle(tr("Edit length")); + dialog->SetFormula(GetFormula()); + if (dialog->exec() == QDialog::Accepted) + { + SetFormula(dialog->GetFormula()); + } + delete dialog; +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. diff --git a/src/app/dialogs/tools/dialogendline.h b/src/app/dialogs/tools/dialogendline.h index d12a86e23..dfaf7b4c0 100644 --- a/src/app/dialogs/tools/dialogendline.h +++ b/src/app/dialogs/tools/dialogendline.h @@ -76,10 +76,13 @@ public slots: * @brief FormulaTextChanged when formula text changes for validation and calc */ void FormulaTextChanged(); - void PutAngle(); + void EvalAngle(); void AngleTextChanged(); void DeployAngleTextEdit(); + + void FXAngle(); + void FXLength(); protected: virtual void ShowVisualization(); /** diff --git a/src/app/dialogs/tools/dialogendline.ui b/src/app/dialogs/tools/dialogendline.ui index 0b67d0a75..73427619c 100644 --- a/src/app/dialogs/tools/dialogendline.ui +++ b/src/app/dialogs/tools/dialogendline.ui @@ -6,12 +6,12 @@ 0 0 - 417 - 571 + 358 + 323 - + 0 0 @@ -32,7 +32,7 @@ - + 0 0 @@ -84,6 +84,9 @@ Qt::Horizontal + + QSizePolicy::Expanding + 40 @@ -93,13 +96,19 @@ - + + + + 0 + 0 + + ... - :/icon/24x24/putHere.png:/icon/24x24/putHere.png + :/icon/24x24/fx.png:/icon/24x24/fx.png @@ -111,6 +120,12 @@ + + + 0 + 0 + + @@ -122,14 +137,14 @@ - + 0 0 - 87 + 60 0 @@ -210,7 +225,7 @@ - + 0 0 @@ -271,13 +286,19 @@ - + + + + 0 + 0 + + ... - :/icon/24x24/putHere.png:/icon/24x24/putHere.png + :/icon/24x24/fx.png:/icon/24x24/fx.png @@ -289,6 +310,12 @@ + + + 0 + 0 + + @@ -300,14 +327,14 @@ - + 0 0 - 87 + 60 0 @@ -384,252 +411,102 @@ - - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - - 0 - 0 - - - - Base point - - - - - - - First point of line - - - - - - - - 0 - 0 - - - - Point label - - - - - - - - - - Type of line - - - - - - - - 80 - 0 - - - - - 110 - 16777215 - - - - Show line from first point to this point - - - - 80 - 14 - - - - - - - - Line color - - - - - - - - - - - - - - Input data - - - - - - - - 0 - 0 - - - - Size and height - - - true - - - - - - - - 0 - 0 - - - - Measurements - - - - - - - - 0 - 0 - - - - Increments - - - - - - - true - - - - 0 - 0 - - - - Length of lines - - - - - - - true - - - - 0 - 0 - - - - Length of arcs - - - - - - - true - - - - 0 - 0 - - - - Length of curves - - - - - - - true - - - - 0 - 0 - - - - Angle of lines - - - - - - + + + QFormLayout::AllNonFixedFieldsGrow + + + + + + 0 + 0 + + + + Base point + + - - - - - - Hide empty measurements - - - true - - - - - - - Variables - - - - + + + + First point of line + + + + + + + + 0 + 0 + + + + Point label + + + + + + + + + + + 0 + 0 + + + + Type of line + + + + + + + + 80 + 0 + + + + + 110 + 16777215 + + + + Show line from first point to this point + + + + 80 + 14 + + + + + + + + + 0 + 0 + + + + Line color + + + + + - - - - - 0 - 0 - - - - Qt::PlainText - - - true - - - @@ -644,23 +521,12 @@ plainTextEditFormula - toolButtonPutHereLength pushButtonGrowLength plainTextEditAngle - toolButtonPutHereAngle pushButtonGrowLengthAngle comboBoxBasePoint lineEditNamePoint comboBoxLineType - radioButtonSizeGrowth - radioButtonStandardTable - radioButtonIncrements - radioButtonLengthLine - radioButtonLengthArc - radioButtonLengthSpline - radioButtonAngleLine - checkBoxHideEmpty - listWidget buttonBox diff --git a/src/app/dialogs/tools/dialogheight.cpp b/src/app/dialogs/tools/dialogheight.cpp index fd704c880..68d26e5df 100644 --- a/src/app/dialogs/tools/dialogheight.cpp +++ b/src/app/dialogs/tools/dialogheight.cpp @@ -249,15 +249,6 @@ void DialogHeight::PointNameChanged() CheckState(); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogHeight::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- void DialogHeight::ShowVisualization() { diff --git a/src/app/dialogs/tools/dialogheight.h b/src/app/dialogs/tools/dialogheight.h index da12d38b1..7f96cfffb 100644 --- a/src/app/dialogs/tools/dialogheight.h +++ b/src/app/dialogs/tools/dialogheight.h @@ -67,7 +67,6 @@ public: public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); - virtual void UpdateList(); protected: virtual void ShowVisualization(); /** diff --git a/src/app/dialogs/tools/dialogline.cpp b/src/app/dialogs/tools/dialogline.cpp index 7efe52b47..5bf1f6f45 100644 --- a/src/app/dialogs/tools/dialogline.cpp +++ b/src/app/dialogs/tools/dialogline.cpp @@ -140,15 +140,6 @@ void DialogLine::PointNameChanged() CheckState(); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogLine::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variables. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- void DialogLine::ShowVisualization() { diff --git a/src/app/dialogs/tools/dialogline.h b/src/app/dialogs/tools/dialogline.h index 7922fdec8..bb07c9b1e 100644 --- a/src/app/dialogs/tools/dialogline.h +++ b/src/app/dialogs/tools/dialogline.h @@ -62,7 +62,6 @@ public: public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); - virtual void UpdateList(); protected: virtual void ShowVisualization(); /** diff --git a/src/app/dialogs/tools/dialoglineintersect.cpp b/src/app/dialogs/tools/dialoglineintersect.cpp index 4662085cd..1356f8798 100644 --- a/src/app/dialogs/tools/dialoglineintersect.cpp +++ b/src/app/dialogs/tools/dialoglineintersect.cpp @@ -224,15 +224,6 @@ void DialogLineIntersect::PointNameChanged() CheckState(); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersect::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- void DialogLineIntersect::ShowVisualization() { diff --git a/src/app/dialogs/tools/dialoglineintersect.h b/src/app/dialogs/tools/dialoglineintersect.h index 5777280cb..deedc9587 100644 --- a/src/app/dialogs/tools/dialoglineintersect.h +++ b/src/app/dialogs/tools/dialoglineintersect.h @@ -65,7 +65,6 @@ public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); void PointChanged(); virtual void PointNameChanged(); - virtual void UpdateList(); protected: virtual void ShowVisualization(); /** diff --git a/src/app/dialogs/tools/dialogpointofintersection.cpp b/src/app/dialogs/tools/dialogpointofintersection.cpp index f45a41a2d..1dce53cbd 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.cpp +++ b/src/app/dialogs/tools/dialogpointofintersection.cpp @@ -156,15 +156,6 @@ void DialogPointOfIntersection::PointNameChanged() CheckState(); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogPointOfIntersection::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- void DialogPointOfIntersection::ShowVisualization() { diff --git a/src/app/dialogs/tools/dialogpointofintersection.h b/src/app/dialogs/tools/dialogpointofintersection.h index b9115c8cc..5b76bab47 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.h +++ b/src/app/dialogs/tools/dialogpointofintersection.h @@ -58,7 +58,6 @@ public: public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); - virtual void UpdateList(); protected: virtual void ShowVisualization(); /** diff --git a/src/app/dialogs/tools/dialogsinglepoint.cpp b/src/app/dialogs/tools/dialogsinglepoint.cpp index f5fc1ca02..d883bbb0d 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.cpp +++ b/src/app/dialogs/tools/dialogsinglepoint.cpp @@ -77,15 +77,6 @@ void DialogSinglePoint::SaveData() pointName = ui->lineEditName->text(); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogSinglePoint::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- /** * @brief setData set name and point diff --git a/src/app/dialogs/tools/dialogsinglepoint.h b/src/app/dialogs/tools/dialogsinglepoint.h index f4bfdb947..c9d8098c1 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.h +++ b/src/app/dialogs/tools/dialogsinglepoint.h @@ -51,7 +51,6 @@ public: public slots: void mousePress(const QPointF &scenePos); - virtual void UpdateList(); protected: /** * @brief SaveData Put dialog data in local variables diff --git a/src/app/dialogs/tools/dialogspline.cpp b/src/app/dialogs/tools/dialogspline.cpp index d5febb89e..bae4cea4c 100644 --- a/src/app/dialogs/tools/dialogspline.cpp +++ b/src/app/dialogs/tools/dialogspline.cpp @@ -180,15 +180,6 @@ void DialogSpline::PointNameChanged() CheckState(); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogSpline::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- void DialogSpline::ShowVisualization() { diff --git a/src/app/dialogs/tools/dialogspline.h b/src/app/dialogs/tools/dialogspline.h index da7e8b790..0c65ee00e 100644 --- a/src/app/dialogs/tools/dialogspline.h +++ b/src/app/dialogs/tools/dialogspline.h @@ -74,7 +74,6 @@ public: public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); - virtual void UpdateList(); protected: virtual void ShowVisualization(); /** diff --git a/src/app/dialogs/tools/dialogsplinepath.cpp b/src/app/dialogs/tools/dialogsplinepath.cpp index 6cf0c431a..6f7f1954b 100644 --- a/src/app/dialogs/tools/dialogsplinepath.cpp +++ b/src/app/dialogs/tools/dialogsplinepath.cpp @@ -243,15 +243,6 @@ void DialogSplinePath::KAsm2Changed(qreal d) item->setData(Qt::UserRole, QVariant::fromValue(p)); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogSplinePath::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- void DialogSplinePath::ShowDialog(bool click) { diff --git a/src/app/dialogs/tools/dialogsplinepath.h b/src/app/dialogs/tools/dialogsplinepath.h index 8d0b7eebf..2fc167716 100644 --- a/src/app/dialogs/tools/dialogsplinepath.h +++ b/src/app/dialogs/tools/dialogsplinepath.h @@ -62,7 +62,6 @@ public slots: void Angle2Changed( qreal index ); void KAsm1Changed(qreal d); void KAsm2Changed(qreal d); - virtual void UpdateList(); virtual void ShowDialog(bool click); void PathUpdated(const VSplinePath &path); protected: diff --git a/src/app/dialogs/tools/dialogtool.cpp b/src/app/dialogs/tools/dialogtool.cpp index 8c72395a4..d6d3c4b5d 100644 --- a/src/app/dialogs/tools/dialogtool.cpp +++ b/src/app/dialogs/tools/dialogtool.cpp @@ -1083,45 +1083,6 @@ void DialogTool::ValChenged(int row) } } -//--------------------------------------------------------------------------------------------------------------------- -/** - * @brief UpdateList update lists of variables - */ -void DialogTool::UpdateList() -{ - SCASSERT(radioButtonSizeGrowth != nullptr); - SCASSERT(radioButtonStandardTable != nullptr); - SCASSERT(radioButtonIncrements != nullptr); - SCASSERT(radioButtonLengthLine != nullptr); - SCASSERT(radioButtonLengthArc != nullptr); - SCASSERT(radioButtonLengthCurve != nullptr); - - if (radioButtonSizeGrowth->isChecked()) - { - SizeHeight(); - } - if (radioButtonStandardTable->isChecked()) - { - ShowVariable(data->DataMeasurements()); - } - if (radioButtonIncrements->isChecked()) - { - ShowVariable(data->DataIncrements()); - } - if (radioButtonLengthLine->isChecked()) - { - ShowVariable(data->DataLengthLines()); - } - if (radioButtonLengthArc->isChecked()) - { - ShowVariable(data->DataLengthArcs()); - } - if (radioButtonLengthCurve->isChecked()) - { - ShowVariable(data->DataLengthSplines()); - } -} - //--------------------------------------------------------------------------------------------------------------------- // cppcheck-suppress unusedFunction quint32 DialogTool::GetToolId() const diff --git a/src/app/dialogs/tools/dialogtool.h b/src/app/dialogs/tools/dialogtool.h index e3abb054d..7c56a1858 100644 --- a/src/app/dialogs/tools/dialogtool.h +++ b/src/app/dialogs/tools/dialogtool.h @@ -121,7 +121,6 @@ public slots: void PutHere(); void PutVal(QListWidgetItem * item); virtual void ValChenged(int row); - virtual void UpdateList(); virtual void PointNameChanged(){} protected: Q_DISABLE_COPY(DialogTool) diff --git a/src/app/dialogs/tools/dialogtriangle.cpp b/src/app/dialogs/tools/dialogtriangle.cpp index 7caa7c885..62191096c 100644 --- a/src/app/dialogs/tools/dialogtriangle.cpp +++ b/src/app/dialogs/tools/dialogtriangle.cpp @@ -195,15 +195,6 @@ void DialogTriangle::PointNameChanged() CheckState(); } -//--------------------------------------------------------------------------------------------------------------------- -void DialogTriangle::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- void DialogTriangle::ShowVisualization() { diff --git a/src/app/dialogs/tools/dialogtriangle.h b/src/app/dialogs/tools/dialogtriangle.h index fa541722d..5a76914b4 100644 --- a/src/app/dialogs/tools/dialogtriangle.h +++ b/src/app/dialogs/tools/dialogtriangle.h @@ -64,7 +64,6 @@ public: public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); - virtual void UpdateList(); protected: virtual void ShowVisualization(); /** diff --git a/src/app/dialogs/tools/dialoguniondetails.cpp b/src/app/dialogs/tools/dialoguniondetails.cpp index b9ad8c05e..12a26c7e1 100644 --- a/src/app/dialogs/tools/dialoguniondetails.cpp +++ b/src/app/dialogs/tools/dialoguniondetails.cpp @@ -69,15 +69,6 @@ void DialogUnionDetails::ChosenObject(quint32 id, const SceneObject &type) } } -//--------------------------------------------------------------------------------------------------------------------- -void DialogUnionDetails::UpdateList() -{ - /* - * Does nothing. We redefine this slot because it is only one now way block update list of variable. - * This dialog doesn't work with formula. Don't delete. Help avoid crash. - */ -} - //--------------------------------------------------------------------------------------------------------------------- /** * @brief CheckObject check if detail contain this id diff --git a/src/app/dialogs/tools/dialoguniondetails.h b/src/app/dialogs/tools/dialoguniondetails.h index 9ad563022..5500a72b4 100644 --- a/src/app/dialogs/tools/dialoguniondetails.h +++ b/src/app/dialogs/tools/dialoguniondetails.h @@ -52,7 +52,6 @@ public: int getIndexD2() const; public slots: void ChosenObject(quint32 id, const SceneObject &type); - virtual void UpdateList(); private: Q_DISABLE_COPY(DialogUnionDetails) diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 00b40e53b..a1d0c0eca 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -318,7 +318,6 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons connect(currentScene, &VMainGraphicsScene::ChoosedObject, dialogTool, &DialogTool::ChosenObject); connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot); connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip); - connect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList); ui->view->itemClicked(nullptr); } else @@ -360,7 +359,6 @@ void MainWindow::SetToolButtonWithApply(bool checked, Tool t, const QString &cur connect(dialogTool, &DialogTool::DialogClosed, this, closeDialogSlot); connect(dialogTool, &DialogTool::DialogApplied, this, applyDialogSlot); connect(dialogTool, &DialogTool::ToolTip, this, &MainWindow::ShowToolTip); - connect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList); connect(ui->view, &VMainGraphicsView::MouseRelease, this, &MainWindow::ClickEndVisualization); ui->view->itemClicked(nullptr); } @@ -685,8 +683,6 @@ void MainWindow::ToolUnionDetails(bool checked) { SetToolButton(checked, Tool::UnionDetails, ":/cursor/union_cursor.png", tr("Select detail"), &MainWindow::ClosedDialogUnionDetails); - //Must disconnect this signal here. - disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogTool::UpdateList); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/share/resources/icon.qrc b/src/app/share/resources/icon.qrc index 439657321..13674f5d0 100644 --- a/src/app/share/resources/icon.qrc +++ b/src/app/share/resources/icon.qrc @@ -56,5 +56,6 @@ icon/16x16/portrait.png icon/16x16/template.png icon/32x32/pdf.png + icon/24x24/fx.png diff --git a/src/app/share/resources/icon/24x24/fx.png b/src/app/share/resources/icon/24x24/fx.png new file mode 100644 index 000000000..ffe25095e Binary files /dev/null and b/src/app/share/resources/icon/24x24/fx.png differ diff --git a/src/app/tools/drawTools/vabstractspline.cpp b/src/app/tools/drawTools/vabstractspline.cpp index 8b10d0b6f..11f33f433 100644 --- a/src/app/tools/drawTools/vabstractspline.cpp +++ b/src/app/tools/drawTools/vabstractspline.cpp @@ -35,9 +35,7 @@ const QString VAbstractSpline::TagName = QStringLiteral("spline"); VAbstractSpline::VAbstractSpline(VPattern *doc, VContainer *data, quint32 id, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsPathItem(parent), controlPoints(QVector()), sceneType(SceneObject::Unknown), isHovered(false), detailsMode(false) -{ - ignoreFullUpdate = true; -} +{} //--------------------------------------------------------------------------------------------------------------------- VAbstractSpline::~VAbstractSpline() diff --git a/src/app/tools/drawTools/vdrawtool.cpp b/src/app/tools/drawTools/vdrawtool.cpp index 14177beba..ad8e2fedd 100644 --- a/src/app/tools/drawTools/vdrawtool.cpp +++ b/src/app/tools/drawTools/vdrawtool.cpp @@ -46,7 +46,7 @@ qreal VDrawTool::factor = 1; * @param id object id in container. */ VDrawTool::VDrawTool(VPattern *doc, VContainer *data, quint32 id, QObject *parent) - :VAbstractTool(doc, data, id, parent), ignoreFullUpdate(false), nameActivDraw(doc->GetNameActivPP()), + :VAbstractTool(doc, data, id, parent), nameActivDraw(doc->GetNameActivPP()), dialog(nullptr), typeLine(TypeLineLine), lineColor(ColorBlack), enabled(true) { connect(this->doc, &VPattern::ChangedActivPP, this, &VDrawTool::ChangedActivDraw); diff --git a/src/app/tools/drawTools/vdrawtool.h b/src/app/tools/drawTools/vdrawtool.h index c4e3d4586..28c64e8d4 100644 --- a/src/app/tools/drawTools/vdrawtool.h +++ b/src/app/tools/drawTools/vdrawtool.h @@ -72,9 +72,6 @@ public slots: virtual void EnableToolMove(bool move); protected: - /** @brief ignoreFullUpdate ignore or not full updates. */ - bool ignoreFullUpdate; - /** @brief nameActivDraw name of tool's pattern peace. */ QString nameActivDraw; @@ -142,10 +139,6 @@ protected: connect(dialog, &DialogTool::DialogClosed, tool, &Tool::FullUpdateFromGuiOk); connect(dialog, &DialogTool::DialogApplied, tool, &Tool::FullUpdateFromGuiApply); - if (ignoreFullUpdate == false) - { - connect(doc, &VPattern::FullUpdateFromFile, dialog, &DialogTool::UpdateList); - } tool->setDialog(); diff --git a/src/app/tools/drawTools/vtoolheight.cpp b/src/app/tools/drawTools/vtoolheight.cpp index 6a452a5d8..c40bbd6f4 100644 --- a/src/app/tools/drawTools/vtoolheight.cpp +++ b/src/app/tools/drawTools/vtoolheight.cpp @@ -52,7 +52,6 @@ VToolHeight::VToolHeight(VPattern *doc, VContainer *data, const quint32 &id, con :VToolLinePoint(doc, data, id, typeLine, lineColor, QString(), basePointId, 0, parent), p1LineId(p1LineId), p2LineId(p2LineId) { - ignoreFullUpdate = true; if (typeCreation == Source::FromGui) { AddToFile(); @@ -95,7 +94,6 @@ VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene, SCASSERT(dialog != nullptr); DialogHeight *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogHeight::UpdateList); const QString pointName = dialogTool->getPointName(); const QString typeLine = dialogTool->GetTypeLine(); const QString lineColor = dialogTool->GetLineColor(); diff --git a/src/app/tools/drawTools/vtoolline.cpp b/src/app/tools/drawTools/vtoolline.cpp index 1f67a5221..640730468 100644 --- a/src/app/tools/drawTools/vtoolline.cpp +++ b/src/app/tools/drawTools/vtoolline.cpp @@ -54,7 +54,6 @@ VToolLine::VToolLine(VPattern *doc, VContainer *data, quint32 id, quint32 firstP { this->typeLine = typeLine; this->lineColor = lineColor; - ignoreFullUpdate = true; //Line const QSharedPointer first = data->GeometricObject(firstPoint); const QSharedPointer second = data->GeometricObject(secondPoint); diff --git a/src/app/tools/drawTools/vtoollineintersect.cpp b/src/app/tools/drawTools/vtoollineintersect.cpp index fa0358d35..ac3b19a00 100644 --- a/src/app/tools/drawTools/vtoollineintersect.cpp +++ b/src/app/tools/drawTools/vtoollineintersect.cpp @@ -53,7 +53,6 @@ VToolLineIntersect::VToolLineIntersect(VPattern *doc, VContainer *data, const qu :VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), p2Line2(p2Line2) { - ignoreFullUpdate = true; if (typeCreation == Source::FromGui) { AddToFile(); diff --git a/src/app/tools/drawTools/vtoolpointofintersection.cpp b/src/app/tools/drawTools/vtoolpointofintersection.cpp index bfc62e0a2..7888c27de 100644 --- a/src/app/tools/drawTools/vtoolpointofintersection.cpp +++ b/src/app/tools/drawTools/vtoolpointofintersection.cpp @@ -49,7 +49,6 @@ VToolPointOfIntersection::VToolPointOfIntersection(VPattern *doc, VContainer *da const Source &typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId) { - ignoreFullUpdate = true; if (typeCreation == Source::FromGui) { AddToFile(); diff --git a/src/app/tools/drawTools/vtoolsinglepoint.cpp b/src/app/tools/drawTools/vtoolsinglepoint.cpp index 68e6ddb42..7eb211a7a 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.cpp +++ b/src/app/tools/drawTools/vtoolsinglepoint.cpp @@ -54,7 +54,6 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, { baseColor = Qt::red; this->setPen(QPen(baseColor, qApp->toPixel(qApp->widthHairLine())/factor)); - ignoreFullUpdate = true; this->setFlag(QGraphicsItem::ItemIsMovable, true); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); this->setFlag(QGraphicsItem::ItemIsFocusable, false); diff --git a/src/app/tools/drawTools/vtooltriangle.cpp b/src/app/tools/drawTools/vtooltriangle.cpp index 7c940caf3..2b2f7b7b2 100644 --- a/src/app/tools/drawTools/vtooltriangle.cpp +++ b/src/app/tools/drawTools/vtooltriangle.cpp @@ -53,7 +53,6 @@ VToolTriangle::VToolTriangle(VPattern *doc, VContainer *data, const quint32 &id, :VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId), secondPointId(secondPointId) { - ignoreFullUpdate = true; if (typeCreation == Source::FromGui) { AddToFile();