From d6a23887629ef287c5d802a420bc3541d346e552 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 3 Feb 2015 10:55:02 +0200 Subject: [PATCH] Refactoring. --HG-- branch : feature --- src/app/dialogs/tools/dialogalongline.cpp | 6 ++---- src/app/dialogs/tools/dialogalongline.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/app/dialogs/tools/dialogalongline.cpp b/src/app/dialogs/tools/dialogalongline.cpp index 382b1c2f6..556a9182a 100644 --- a/src/app/dialogs/tools/dialogalongline.cpp +++ b/src/app/dialogs/tools/dialogalongline.cpp @@ -42,7 +42,7 @@ */ DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId, QWidget *parent) :DialogTool(data, toolId, parent), ui(new Ui::DialogAlongLine), - formula(QString()), formulaBaseHeight(0), line(nullptr), lineColor(VAbstractTool::ColorBlack) + formula(QString()), formulaBaseHeight(0), line(nullptr) { ui->setupUi(this); InitVariables(ui); @@ -60,7 +60,6 @@ DialogAlongLine::DialogAlongLine(const VContainer *data, const quint32 &toolId, FillComboBoxPoints(ui->comboBoxFirstPoint); FillComboBoxPoints(ui->comboBoxSecondPoint); FillComboBoxTypeLine(ui->comboBoxLineType, VAbstractTool::LineStylesPics()); - ui->comboBoxLineType->setCurrentIndex(0); FillComboBoxLineColors(ui->comboBoxLineColor); connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogAlongLine::PutHere); @@ -252,13 +251,12 @@ void DialogAlongLine::setTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogAlongLine::getLineColor() const { - return lineColor; + return GetLineColor(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- void DialogAlongLine::setLineColor(const QString &value) { - lineColor = value; ChangeCurrentData(ui->comboBoxLineColor, value); } diff --git a/src/app/dialogs/tools/dialogalongline.h b/src/app/dialogs/tools/dialogalongline.h index d506e10c1..5ae9c2df3 100644 --- a/src/app/dialogs/tools/dialogalongline.h +++ b/src/app/dialogs/tools/dialogalongline.h @@ -94,8 +94,6 @@ private: /** @brief formulaBaseHeight base height defined by dialogui */ int formulaBaseHeight; VisToolAlongLine *line; - - QString lineColor; }; #endif // DIALOGALONGLINE_H