diff --git a/dist/OBS_debian/debian.control b/dist/OBS_debian/debian.control index 63e057ff6..8f3c4651c 100644 --- a/dist/OBS_debian/debian.control +++ b/dist/OBS_debian/debian.control @@ -12,11 +12,12 @@ Build-Depends: debhelper (>= 8.0.0), libqt5opengl5-dev (>= 5.4.0) Standards-Version: 3.9.5 Homepage: https://valentinaproject.bitbucket.io/ -Vcs-Browser: https://bitbucket.org/dismine/valentina +Vcs-Browser: https://gitlab.com/smart-pattern/valentina Package: valentina Architecture: i386 amd64 -Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0) | libqt5core5 (>= 5.4.0), libqt5gui5 (>= 5.4.0) | libqt5gui5-gles (>= 5.4.0), libqt5printsupport5 (>= 5.4.0), libqt5svg5 (>= 5.4.0), libqt5widgets5 (>= 5.4.0), libqt5xml5 (>= 5.4.0), libqt5xmlpatterns5 (>= 5.4.0), libqt5concurrent5(>= 5.4.0), libqt5opengl5 (>= 5.4.0), libstdc++6 (>= 4.8), xpdf +Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0) | libqt5core5 (>= 5.4.0), libqt5gui5 (>= 5.4.0) | libqt5gui5-gles (>= 5.4.0), libqt5printsupport5 (>= 5.4.0), libqt5svg5 (>= 5.4.0), libqt5widgets5 (>= 5.4.0), libqt5xml5 (>= 5.4.0), libqt5xmlpatterns5 (>= 5.4.0), libqt5concurrent5(>= 5.4.0), libqt5opengl5 (>= 5.4.0), libstdc++6 (>= 4.8) +Suggests: xpdf Conflicts: seamly2d Description: Pattern making program. Valentina is a cross-platform patternmaking program which allows designers diff --git a/dist/debian/control b/dist/debian/control index 63e057ff6..8f3c4651c 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -12,11 +12,12 @@ Build-Depends: debhelper (>= 8.0.0), libqt5opengl5-dev (>= 5.4.0) Standards-Version: 3.9.5 Homepage: https://valentinaproject.bitbucket.io/ -Vcs-Browser: https://bitbucket.org/dismine/valentina +Vcs-Browser: https://gitlab.com/smart-pattern/valentina Package: valentina Architecture: i386 amd64 -Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0) | libqt5core5 (>= 5.4.0), libqt5gui5 (>= 5.4.0) | libqt5gui5-gles (>= 5.4.0), libqt5printsupport5 (>= 5.4.0), libqt5svg5 (>= 5.4.0), libqt5widgets5 (>= 5.4.0), libqt5xml5 (>= 5.4.0), libqt5xmlpatterns5 (>= 5.4.0), libqt5concurrent5(>= 5.4.0), libqt5opengl5 (>= 5.4.0), libstdc++6 (>= 4.8), xpdf +Depends: libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libqt5core5a (>= 5.4.0) | libqt5core5 (>= 5.4.0), libqt5gui5 (>= 5.4.0) | libqt5gui5-gles (>= 5.4.0), libqt5printsupport5 (>= 5.4.0), libqt5svg5 (>= 5.4.0), libqt5widgets5 (>= 5.4.0), libqt5xml5 (>= 5.4.0), libqt5xmlpatterns5 (>= 5.4.0), libqt5concurrent5(>= 5.4.0), libqt5opengl5 (>= 5.4.0), libstdc++6 (>= 4.8) +Suggests: xpdf Conflicts: seamly2d Description: Pattern making program. Valentina is a cross-platform patternmaking program which allows designers diff --git a/dist/rpm/valentina.spec b/dist/rpm/valentina.spec index 8d75c2025..ce1341b8e 100644 --- a/dist/rpm/valentina.spec +++ b/dist/rpm/valentina.spec @@ -83,7 +83,7 @@ Requires: poppler-utils Version: 0.7.0 Release: 0 -URL: https://bitbucket.org/dismine/valentina +URL: https://gitlab.com/smart-pattern/valentina License: GPL-3.0+ Source0: %{name}-%{version}.tar.gz Group: Graphics diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 205533881..a5f882af9 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -2143,13 +2143,13 @@ void MainWindow::ToolBarDraws() connect(ui->actionOptionDraw, &QAction::triggered, this, [this]() { - const QString activDraw = doc->GetNameActivPP(); - const QString nameDraw = PatternPieceName(activDraw); - if (nameDraw.isEmpty() || activDraw == nameDraw) + QString draw = doc->GetNameActivPP(); + bool ok = PatternPieceName(draw); + if (not ok) { return; } - qApp->getUndoStack()->push(new RenamePP(doc, nameDraw, comboBoxDraws)); + qApp->getUndoStack()->push(new RenamePP(doc, draw, comboBoxDraws)); }); } @@ -4670,11 +4670,10 @@ void MainWindow::CreateActions() qCDebug(vMainWindow, "Generated PP name: %s", qUtf8Printable(patternPieceName)); qCDebug(vMainWindow, "PP count %d", comboBoxDraws->count()); - patternPieceName = PatternPieceName(patternPieceName); + bool ok = PatternPieceName(patternPieceName); qCDebug(vMainWindow, "PP name: %s", qUtf8Printable(patternPieceName)); - if (patternPieceName.isEmpty()) + if (not ok) { - qCDebug(vMainWindow, "Name empty."); return; } @@ -4879,7 +4878,7 @@ void MainWindow::InitAutoSave() } //--------------------------------------------------------------------------------------------------------------------- -QString MainWindow::PatternPieceName(const QString &text) +bool MainWindow::PatternPieceName(QString &name) { QScopedPointer dlg(new QInputDialog(this)); dlg->setInputMode( QInputDialog::TextInput ); @@ -4887,23 +4886,29 @@ QString MainWindow::PatternPieceName(const QString &text) dlg->setTextEchoMode(QLineEdit::Normal); dlg->setWindowTitle(tr("Enter a new label for the pattern piece.")); dlg->resize(300, 100); - dlg->setTextValue(text); + dlg->setTextValue(name); QString nameDraw; while (1) { const bool bOk = dlg->exec(); nameDraw = dlg->textValue(); - if (bOk == false || nameDraw.isEmpty() || text == nameDraw) + if (not bOk) { - return text; + return false; + } + + if (nameDraw.isEmpty()) + { + continue; } if (comboBoxDraws->findText(nameDraw) == -1) { - break;//repeate show dialog + name = nameDraw; + break;// unique name } } - return nameDraw; + return true; } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h index f5b30d68f..2e4dbe494 100644 --- a/src/app/valentina/mainwindow.h +++ b/src/app/valentina/mainwindow.h @@ -339,7 +339,7 @@ private: void CreateMenus(); void CreateActions(); void InitAutoSave(); - QString PatternPieceName(const QString &text); + bool PatternPieceName(QString &name); QString CheckPathToMeasurements(const QString &patternPath, const QString &path); QComboBox *SetGradationList(QLabel *label, const QStringList &list); void ChangePP(int index, bool zoomBestFit = true); diff --git a/src/app/valentina/mainwindowsnogui.h b/src/app/valentina/mainwindowsnogui.h index 52df26f62..ac0bac08c 100644 --- a/src/app/valentina/mainwindowsnogui.h +++ b/src/app/valentina/mainwindowsnogui.h @@ -188,7 +188,7 @@ private: void AAMADxfFile(const QString &name, int version, bool binary, const QSize &size, const QVector &details) const; void ASTMDxfFile(const QString &name, int version, bool binary, const QSize &size, - const QVector &details) const; + const QVector &details) const; void PreparePaper(int index) const; void RestorePaper(int index) const;