Merge branch 'develop' into feature/manual-layout

This commit is contained in:
Roman Telezhynskyi 2020-04-22 15:14:50 +03:00
parent 30a27ee85a
commit 46225d641d
6 changed files with 27 additions and 20 deletions

View File

@ -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

5
dist/debian/control vendored
View File

@ -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

View File

@ -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

View File

@ -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<QInputDialog> 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;
}
//---------------------------------------------------------------------------------------------------------------------

View File

@ -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);