diff --git a/src/app/dialogs/tools/dialogbisector.cpp b/src/app/dialogs/tools/dialogbisector.cpp
index 3320e63ba..c6bca1bca 100644
--- a/src/app/dialogs/tools/dialogbisector.cpp
+++ b/src/app/dialogs/tools/dialogbisector.cpp
@@ -34,6 +34,7 @@
#include "../../visualization/vistoolbisector.h"
#include "../../widgets/vmaingraphicsscene.h"
#include "../../tools/vabstracttool.h"
+#include "dialogeditwrongformula.h"
//---------------------------------------------------------------------------------------------------------------------
/**
@@ -46,7 +47,6 @@ DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QW
line(nullptr)
{
ui->setupUi(this);
- InitVariables(ui);
InitFormulaUI(ui);
ui->lineEditNamePoint->setText(qApp->getCurrentDocument()->GenerateLabel(LabelType::NewLabel));
labelEditNamePoint = ui->labelEditNamePoint;
@@ -63,9 +63,7 @@ DialogBisector::DialogBisector(const VContainer *data, const quint32 &toolId, QW
FillComboBoxPoints(ui->comboBoxThirdPoint);
FillComboBoxLineColors(ui->comboBoxLineColor);
- connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogBisector::PutHere);
- connect(listWidget, &QListWidget::itemDoubleClicked, this, &DialogBisector::PutVal);
-
+ connect(ui->toolButtonExprLength, &QPushButton::clicked, this, &DialogBisector::FXLength);
connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogBisector::NamePointChanged);
connect(ui->plainTextEditFormula, &QPlainTextEdit::textChanged, this, &DialogBisector::FormulaTextChanged);
connect(ui->pushButtonGrowLength, &QPushButton::clicked, this, &DialogBisector::DeployFormulaTextEdit);
@@ -110,6 +108,19 @@ void DialogBisector::PointNameChanged()
CheckState();
}
+//---------------------------------------------------------------------------------------------------------------------
+void DialogBisector::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;
+}
+
//---------------------------------------------------------------------------------------------------------------------
void DialogBisector::ShowVisualization()
{
diff --git a/src/app/dialogs/tools/dialogbisector.h b/src/app/dialogs/tools/dialogbisector.h
index b1a2d2316..1ff6df5b3 100644
--- a/src/app/dialogs/tools/dialogbisector.h
+++ b/src/app/dialogs/tools/dialogbisector.h
@@ -79,6 +79,7 @@ public slots:
*/
void FormulaTextChanged();
virtual void PointNameChanged();
+ void FXLength();
protected:
virtual void ShowVisualization();
/**
diff --git a/src/app/dialogs/tools/dialogbisector.ui b/src/app/dialogs/tools/dialogbisector.ui
index ad16c980b..6020f5b99 100644
--- a/src/app/dialogs/tools/dialogbisector.ui
+++ b/src/app/dialogs/tools/dialogbisector.ui
@@ -7,7 +7,7 @@
0
0
428
- 565
+ 317
@@ -84,16 +84,13 @@
-
-
-
- Insert marked variable into the formula
-
+
...
- :/icon/24x24/putHere.png:/icon/24x24/putHere.png
+ :/icon/24x24/fx.png:/icon/24x24/fx.png
@@ -200,283 +197,127 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
- Point label
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- First point
-
-
-
- -
-
-
- First point of angle
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Second point
-
-
-
- -
-
-
- Second point of angle
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Third point
-
-
-
- -
-
-
- Third point of angle
-
-
-
- -
-
-
- Type of line
-
-
-
- -
-
-
-
- 80
- 0
-
-
-
-
- 110
- 16777215
-
-
-
- Show line from second 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
-
-
-
-
-
-
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Point label
+
+
- -
-
-
-
-
-
- Hide empty measurements
-
-
- true
-
-
-
- -
-
-
- Variables - Click twice to insert into formula
-
-
-
-
+ -
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ First point
+
+
+
+ -
+
+
+ First point of angle
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Second point
+
+
+
+ -
+
+
+ Second point of angle
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+ Third point
+
+
+
+ -
+
+
+ Third point of angle
+
+
+
+ -
+
+
+ Type of line
+
+
+
+ -
+
+
+
+ 80
+ 0
+
+
+
+
+ 110
+ 16777215
+
+
+
+ Show line from second point to this point
+
+
+
+ 80
+ 14
+
+
+
+
+ -
+
+
+ Line color
+
+
+
+ -
+
- -
-
-
-
-
-
- true
-
-
-
-
@@ -494,22 +335,12 @@
plainTextEditFormula
- toolButtonPutHere
pushButtonGrowLength
lineEditNamePoint
comboBoxFirstPoint
comboBoxSecondPoint
comboBoxThirdPoint
comboBoxLineType
- radioButtonSizeGrowth
- radioButtonStandardTable
- radioButtonIncrements
- radioButtonLengthLine
- radioButtonLengthArc
- radioButtonLengthSpline
- radioButtonAngleLine
- checkBoxHideEmpty
- listWidget
buttonBox