diff --git a/src/app/dialogs/tools/dialogsinglepoint.cpp b/src/app/dialogs/tools/dialogsinglepoint.cpp index 3cc17ca49..3c95d069c 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.cpp +++ b/src/app/dialogs/tools/dialogsinglepoint.cpp @@ -36,7 +36,7 @@ * @param parent parent widget */ DialogSinglePoint::DialogSinglePoint(const VContainer *data, const quint32 &toolId, QWidget *parent) - :DialogTool(data, toolId, parent), ui(new Ui::DialogSinglePoint), name(QString()), point(QPointF()) + :DialogTool(data, toolId, parent), ui(new Ui::DialogSinglePoint), point(QPointF()) { ui->setupUi(this); ui->doubleSpinBoxX->setRange(0, qApp->fromPixel(SceneSize)); @@ -44,10 +44,10 @@ DialogSinglePoint::DialogSinglePoint(const VContainer *data, const quint32 &tool labelEditNamePoint = ui->labelEditName; InitOkCancel(ui); - flagName = false; + flagName = true; CheckState(); - connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogSinglePoint::NamePointChanged); + connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogTool::NamePointChanged); } //--------------------------------------------------------------------------------------------------------------------- @@ -74,7 +74,7 @@ void DialogSinglePoint::mousePress(const QPointF &scenePos) void DialogSinglePoint::SaveData() { point = QPointF(qApp->toPixel(ui->doubleSpinBoxX->value()), qApp->toPixel(ui->doubleSpinBoxY->value())); - name = ui->lineEditName->text(); + pointName = ui->lineEditName->text(); } //--------------------------------------------------------------------------------------------------------------------- @@ -94,7 +94,7 @@ void DialogSinglePoint::UpdateList() */ void DialogSinglePoint::setData(const QString &name, const QPointF &point) { - this->name = name; + pointName = name; this->point = point; isInitialized = true; ui->lineEditName->setText(name); diff --git a/src/app/dialogs/tools/dialogsinglepoint.h b/src/app/dialogs/tools/dialogsinglepoint.h index 25972eb7f..86e489ab9 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.h +++ b/src/app/dialogs/tools/dialogsinglepoint.h @@ -62,9 +62,6 @@ private: /** @brief ui keeps information about user interface */ Ui::DialogSinglePoint *ui; - /** @brief name name of point */ - QString name; - /** @brief point data of point */ QPointF point; }; @@ -76,7 +73,7 @@ private: */ inline QString DialogSinglePoint::getName() const { - return name; + return pointName; } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 53eadddc3..be206e7cb 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -1407,6 +1407,7 @@ bool MainWindow::Save() */ void MainWindow::Open() { + qCDebug(vMainWindow)<<"Openning new file."; const QString filter(tr("Pattern files (*.val)")); //Get list last open files const QStringList files = qApp->getSettings()->GetRecentFileList();