From c0341a086c1ae495fb8df196d3d38c56ae4b49b8 Mon Sep 17 00:00:00 2001 From: Ronan Le Tiec Date: Wed, 28 Jun 2017 20:19:20 +0200 Subject: [PATCH 1/6] Resolved issue #693, sort the groups, details and pattern pieces alphabeticaly und change the caption of group to details in Detail Mode --HG-- branch : develop --- src/app/valentina/dialogs/vwidgetdetails.cpp | 1 + src/app/valentina/dialogs/vwidgetgroups.cpp | 3 +++ src/app/valentina/mainwindow.cpp | 8 +++++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp index a04ab5b3f..33b572f9b 100644 --- a/src/app/valentina/dialogs/vwidgetdetails.cpp +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -149,6 +149,7 @@ void VWidgetDetails::FillTable(const QHash *details) ui->tableWidget->setItem(currentRow, 1, item); ++i; } + ui->tableWidget->sortItems(1,Qt::AscendingOrder); ui->tableWidget->resizeColumnsToContents(); ui->tableWidget->resizeRowsToContents(); diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index a647786ea..b70134bc3 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -88,6 +88,8 @@ void VWidgetGroups::RenameGroup(int row, int column) const quint32 id = ui->tableWidget->item(row, 0)->data(Qt::UserRole).toUInt(); doc->SetGroupName(id, ui->tableWidget->item(row, column)->text()); + + UpdateGroups(); } //--------------------------------------------------------------------------------------------------------------------- @@ -174,6 +176,7 @@ void VWidgetGroups::FillTable(const QMap > &groups ui->tableWidget->setItem(currentRow, 1, item); ++i; } + ui->tableWidget->sortItems(1,Qt::AscendingOrder); ui->tableWidget->resizeColumnsToContents(); ui->tableWidget->resizeRowsToContents(); ui->tableWidget->blockSignals(false); diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp index 84796d5b8..5d874a04e 100644 --- a/src/app/valentina/mainwindow.cpp +++ b/src/app/valentina/mainwindow.cpp @@ -2306,6 +2306,7 @@ void MainWindow::ActionDraw(bool checked) ui->dockWidgetToolOptions->setVisible(isDockToolOptionsVisible); ui->dockWidgetGroups->setWidget(groupsWidget); + ui->dockWidgetGroups->setWindowTitle(tr("Group")); ui->dockWidgetGroups->setVisible(isDockGroupsVisible); ui->dockWidgetGroups->setToolTip(tr("Contains all visibility groups")); } @@ -2380,6 +2381,7 @@ void MainWindow::ActionDetails(bool checked) ui->dockWidgetToolOptions->setVisible(isDockToolOptionsVisible); ui->dockWidgetGroups->setWidget(detailsWidget); + ui->dockWidgetGroups->setWindowTitle(tr("Details")); ui->dockWidgetGroups->setVisible(isDockGroupsVisible); ui->dockWidgetGroups->setToolTip(tr("Show which details will go in layout")); @@ -2906,7 +2908,11 @@ void MainWindow::FullParseFile() } comboBoxDraws->blockSignals(true); comboBoxDraws->clear(); - comboBoxDraws->addItems(doc->getPatternPieces()); + + QStringList patternPieceNames = doc->getPatternPieces(); + patternPieceNames.sort(); + comboBoxDraws->addItems(patternPieceNames); + if (not drawMode) { comboBoxDraws->setCurrentIndex(comboBoxDraws->count()-1); From ce9219d6680cc44ea8796390307a0bd634e442bb Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 29 Jun 2017 10:27:40 +0300 Subject: [PATCH 2/6] Fix code style. --HG-- branch : develop --- src/app/valentina/dialogs/vwidgetdetails.cpp | 2 +- src/app/valentina/dialogs/vwidgetgroups.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/valentina/dialogs/vwidgetdetails.cpp b/src/app/valentina/dialogs/vwidgetdetails.cpp index 33b572f9b..8200526da 100644 --- a/src/app/valentina/dialogs/vwidgetdetails.cpp +++ b/src/app/valentina/dialogs/vwidgetdetails.cpp @@ -149,7 +149,7 @@ void VWidgetDetails::FillTable(const QHash *details) ui->tableWidget->setItem(currentRow, 1, item); ++i; } - ui->tableWidget->sortItems(1,Qt::AscendingOrder); + ui->tableWidget->sortItems(1, Qt::AscendingOrder); ui->tableWidget->resizeColumnsToContents(); ui->tableWidget->resizeRowsToContents(); diff --git a/src/app/valentina/dialogs/vwidgetgroups.cpp b/src/app/valentina/dialogs/vwidgetgroups.cpp index b70134bc3..c6c39332a 100644 --- a/src/app/valentina/dialogs/vwidgetgroups.cpp +++ b/src/app/valentina/dialogs/vwidgetgroups.cpp @@ -176,7 +176,7 @@ void VWidgetGroups::FillTable(const QMap > &groups ui->tableWidget->setItem(currentRow, 1, item); ++i; } - ui->tableWidget->sortItems(1,Qt::AscendingOrder); + ui->tableWidget->sortItems(1, Qt::AscendingOrder); ui->tableWidget->resizeColumnsToContents(); ui->tableWidget->resizeRowsToContents(); ui->tableWidget->blockSignals(false); From 6728465c7d0cd1abd9f886291199ad88ad537f8c Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 29 Jun 2017 10:29:35 +0300 Subject: [PATCH 3/6] Updated changelog. --HG-- branch : develop --- ChangeLog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 5d5bba018..9436a6099 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -5,6 +5,7 @@ - [#244] New feature: Adjust line and point thickness and label size. - [#637] Max scene size too small to fit all objects. - New feature Zoom Fit Best Current pattern piece. +- [#693] New feature: Sort workpiece "Groups" by name. # Version 0.5.1 - [#683] Tool Seam allowance's dialog is off screen on small resolutions. From 02f79ee87f650734712aece36d08c6bb50f9ada7 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 29 Jun 2017 10:48:54 +0300 Subject: [PATCH 4/6] Lupdate. --HG-- branch : develop --- share/translations/measurements_p14_fr_FR.ts | 42 ++++++------- share/translations/valentina_es_ES.ts | 10 ++-- share/translations/valentina_pt_BR.ts | 62 +++++++++++++++----- 3 files changed, 73 insertions(+), 41 deletions(-) diff --git a/share/translations/measurements_p14_fr_FR.ts b/share/translations/measurements_p14_fr_FR.ts index 425454ded..f48499c99 100644 --- a/share/translations/measurements_p14_fr_FR.ts +++ b/share/translations/measurements_p14_fr_FR.ts @@ -690,19 +690,19 @@ foot_instep_circ Name in a formula. Don't use math symbols and space in name!!!! - tour_coup_de_pied + tour_voute_de_pied Foot: Instep circumference Full measurement name. - tour_de_cou_de_pied + Pied : Tour de la Voûte du pied Measure circumference at tallest part of instep. Full measurement description. - Mesure du tour au plus creux du cou-de-pied + Mesure du tour au plus creux de la voûte du pied. @@ -726,13 +726,13 @@ head_length Name in a formula. Don't use math symbols and space in name!!!! - tete_longueur + tete_hauteur Head: Length Full measurement name. - Tête: Longueur + Tête: Hauteur @@ -744,7 +744,7 @@ head_depth Name in a formula. Don't use math symbols and space in name!!!! - Tete_profondeur + tete_profondeur @@ -768,7 +768,7 @@ Head: Width Full measurement name. - Tête : largeur + Tête : Largeur @@ -786,7 +786,7 @@ Head: Crown to Neck Back Full measurement name. - Tête: Du haut à la nuque + Tête: Du Haut à la Nuque @@ -804,7 +804,7 @@ Head: Chin to Neck Back Full measurement name. - Tête: Du menton à la nuque + Tête: Du Menton à la Nuque @@ -828,7 +828,7 @@ Circumference of Neck midsection, about halfway between jaw and torso. Full measurement description. - Circonférence du cou, à la moitié entre la machoire et le torse. + Circonférence du cou, à la moitié entre la mâchoire et le torse. @@ -852,13 +852,13 @@ highbust_circ Name in a formula. Don't use math symbols and space in name!!!! - tour_surpoitrinaire + surpoitrine_circ Highbust circumference Full measurement name. - Tour surpoitrinaire + Tour Sur-Poitrine @@ -882,19 +882,19 @@ Circumference around Bust, parallel to floor. Full measurement description. - Circonférence autour du buste, parallèle au sol + Circonférence autour du buste, parallèle au sol. lowbust_circ Name in a formula. Don't use math symbols and space in name!!!! - tour_souspoitrinaire + tour_souspoitrine Lowbust circumference Full measurement name. - Tour sous-poitrinaire + Tour Sous-poitrine @@ -912,7 +912,7 @@ Rib circumference Full measurement name. - Tour cage thoracique + Tour Cage Thoracique @@ -930,7 +930,7 @@ Waist circumference Full measurement name. - Tour de taille + Tour de Taille @@ -942,7 +942,7 @@ Highhip circumference Full measurement name. - Tour des petites hanches + Tour des Petites Hanches @@ -954,19 +954,19 @@ height_waist_back Name in a formula. Don't use math symbols and space in name!!!! - haut_taille_dos + hauteur_taille_dos Height: Waist Back Full measurement name. - Hauteur taille dos + Hauteur Taille Dos Vertical height from Waist Back to floor. ('Height: Waist Front'' - 'Leg: Crotch to floor''). Full measurement description. - hauteur_taille_dos + Hauteur Verticale partant de la Taille Dos jusqu'au sol. (Hauteur: Taille Devant" - "Jambe: Fourche jusqu'au sol"). diff --git a/share/translations/valentina_es_ES.ts b/share/translations/valentina_es_ES.ts index 72457a194..6b07a5c09 100644 --- a/share/translations/valentina_es_ES.ts +++ b/share/translations/valentina_es_ES.ts @@ -2484,7 +2484,7 @@ Uknown - + Desconocido @@ -3124,7 +3124,7 @@ Apply settings anyway? Move - + Mover @@ -7089,7 +7089,7 @@ Quiere guardar los cambios? Layout - Diseño + Plano Templates @@ -7183,7 +7183,7 @@ Quiere guardar los cambios? GUI language: - Idioma de interfaz gráfica de usuario: + Idioma del interfaz gráfica de usuario: Decimal separator parts: @@ -8864,7 +8864,7 @@ Do you want to save your changes? GUI language: - Idioma de interfaz gráfica de usuario: + Idioma del interfaz gráfica de usuario: Decimal separator parts: diff --git a/share/translations/valentina_pt_BR.ts b/share/translations/valentina_pt_BR.ts index f12af53e8..a63368d5b 100644 --- a/share/translations/valentina_pt_BR.ts +++ b/share/translations/valentina_pt_BR.ts @@ -1472,10 +1472,42 @@ Interlining Forro interno + + Cut on fold + Cortar e dobrar + + + Grainline + Fio + + + Grainline visible + Fio visível + <html><head/><body><p>Show full calculation in message box</p></body></html> <html><head/><body><p>Mostrar cálculo completo na caixa de mensagem</p></body></html> + + Length should be positive + Comprimento deve ser positivo + + + Arrows: + Setas: + + + Both + Ambos + + + Just front + Apenas frente + + + Just rear + Apenas costas + DialogEditWrongFormula @@ -1581,7 +1613,7 @@ Curve angle - + Ângulo da curva Formula: @@ -1601,11 +1633,11 @@ Full name - + Nome completo Functions - + Funções Lengths to control points @@ -3175,15 +3207,15 @@ Apply settings anyway? Change image - + Trocar imagem Save image to file - + Salvar imagem para arquivo Show image - + Mostrar imagem Image for pattern @@ -4076,7 +4108,7 @@ Apply settings anyway? Grainline - + Fio Select main path objects clockwise, <b>Shift</b> - reverse direction curve, <b>Enter</b> - finish creation @@ -4112,7 +4144,7 @@ Apply settings anyway? Length should be positive - + Comprimento deve ser positivo Parser error: %1 @@ -4172,19 +4204,19 @@ Apply settings anyway? Cut on fold - + Cortar e dobrar Both - + Ambos Just front - + Apenas frente Just rear - + Apenas costas Pins @@ -7118,7 +7150,7 @@ Do you want to save your changes? Full name - + Nome completo File '%1' doesn't exist! @@ -7328,7 +7360,7 @@ Do you want to save your changes? TabGrainline Grainline visible - + Fio visível Rotation: @@ -7368,7 +7400,7 @@ Do you want to save your changes? Arrows: - + Setas: From 9c14f46a26dfacf7d3991524d287110f68fa822f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 27 Jun 2017 16:09:16 +0300 Subject: [PATCH 5/6] Fix bug. Valentina overrids exported file even if a user said no. (grafted from cebb2be5d991225d9689a43e44c7764c31d708ff) --HG-- branch : develop --- ChangeLog.txt | 1 + src/app/valentina/dialogs/dialogsavelayout.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 9436a6099..978bf2ab3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -25,6 +25,7 @@ - [#703] Valentina warns about format rewriting for unsaved files. - [#704] Valentina crashes if click on detail. - [#706] Default unit in preferences not changing new file unit. +- Fix bug. Valentina overrids exported file even if a user said no. # Version 0.5.0 May 9, 2017 - [#581] User can now filter input lists by keyword in function wizard. diff --git a/src/app/valentina/dialogs/dialogsavelayout.cpp b/src/app/valentina/dialogs/dialogsavelayout.cpp index e5aa81532..d19e4b16d 100644 --- a/src/app/valentina/dialogs/dialogsavelayout.cpp +++ b/src/app/valentina/dialogs/dialogsavelayout.cpp @@ -220,6 +220,7 @@ void DialogSaveLayout::Save() .arg(name), QMessageBox::Yes|QMessageBox::No, QMessageBox::Yes); if (res == QMessageBox::No) { + reject(); return; } else From b18f5fa92814d18741cd73153a0c233359298bf4 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Thu, 29 Jun 2017 14:47:24 +0300 Subject: [PATCH 6/6] Fix bug. Date on label doesn't obey GUI language locale. (grafted from b60a78d145f51bef3bc08978e1fe3b0a7d6500ab) --HG-- branch : develop --- ChangeLog.txt | 1 + src/libs/vlayout/vtextmanager.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 978bf2ab3..04bc38d4d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -26,6 +26,7 @@ - [#704] Valentina crashes if click on detail. - [#706] Default unit in preferences not changing new file unit. - Fix bug. Valentina overrids exported file even if a user said no. +- Fix bug. Date on label doesn't obey GUI language locale. # Version 0.5.0 May 9, 2017 - [#581] User can now filter input lists by keyword in function wizard. diff --git a/src/libs/vlayout/vtextmanager.cpp b/src/libs/vlayout/vtextmanager.cpp index 41d043e7b..8a935bee8 100644 --- a/src/libs/vlayout/vtextmanager.cpp +++ b/src/libs/vlayout/vtextmanager.cpp @@ -376,7 +376,8 @@ void VTextManager::Update(const VAbstractPattern *pDoc, qreal dSize, qreal dHeig } if (date.isValid() == true) { - tl.m_qsText = date.toString("dd MMMM yyyy"); + QLocale locale(qApp->Settings()->GetLocale()); + tl.m_qsText = locale.toString(date, "dd MMMM yyyy"); tl.m_eFontWeight = QFont::Normal; tl.m_eStyle = QFont::StyleNormal; tl.m_iFontSize = 0;