diff --git a/ChangeLog.txt b/ChangeLog.txt
index 1df379dbf..92225cdc2 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -47,7 +47,9 @@
- Setting scale factor for export and print.
- New layout generator option: Prefer one sheet solution.
- [smart-pattern/valentina#15] Organization of groups - groups categories
-- Improve the property browser. Show full arc name.
+- Improve the property browser. Show full arc name.
+- [smart-pattern/valentina#45] Optimize tool box position for big screen resolutions.
+- [smart-pattern/valentina#40] Invalid name of arc in modeling mode.
# Version 0.6.2 (unreleased)
- [#903] Bug in tool Cut Spline path.
diff --git a/share/translations/valentina_it_IT.ts b/share/translations/valentina_it_IT.ts
index cfcb145fc..7baaed16c 100644
--- a/share/translations/valentina_it_IT.ts
+++ b/share/translations/valentina_it_IT.ts
@@ -5597,30 +5597,6 @@ Applicare la configurazione comunque?
-
-
-
-
-
-
-
-
-
-
- Nome:
-
-
-
-
-
-
-
-
-
-
-
-
-
DialogSaveLAyout
@@ -11437,25 +11413,6 @@ Vuoi salvare le tue modifiche?
-
-
-
-
-
-
-
-
-
-
-
-
- Impossibile aprire file %1:
-%2.
-
-
-
@@ -11753,21 +11710,6 @@ Vuoi salvare le tue modifiche?
-
- VBank
-
-
-
-
-
-
-
-
-
-
-
-
-
VCommandLine
diff --git a/src/app/puzzle/vpcarrouselpiece.h b/src/app/puzzle/vpcarrouselpiece.h
index 7a2008a7d..9be77a355 100644
--- a/src/app/puzzle/vpcarrouselpiece.h
+++ b/src/app/puzzle/vpcarrouselpiece.h
@@ -60,6 +60,7 @@ public:
private:
+ Q_DISABLE_COPY(VPCarrouselPiece)
VPPiece *m_piece;
private slots:
diff --git a/src/app/share/collection/bugs/smart_pattern_#36.val b/src/app/share/collection/bugs/smart_pattern_#36.val
new file mode 100644
index 000000000..8b8188aff
--- /dev/null
+++ b/src/app/share/collection/bugs/smart_pattern_#36.val
@@ -0,0 +1,388 @@
+
+
+
+ 0.8.7
+ mm
+
+
+ надсечка внутри детали
+
+
+
+
+
+
+
+
+
+ smart_pattern_#36.vit
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/share/collection/bugs/smart_pattern_#36.vit b/src/app/share/collection/bugs/smart_pattern_#36.vit
new file mode 100644
index 000000000..6f32584f1
--- /dev/null
+++ b/src/app/share/collection/bugs/smart_pattern_#36.vit
@@ -0,0 +1,24 @@
+
+
+ 0.5.0
+true
+
+ cm
+ 998
+
+
+336
+
+ 1800-01-01
+ female
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp
index 2d6188849..889f2e3b8 100644
--- a/src/app/tape/tmainwindow.cpp
+++ b/src/app/tape/tmainwindow.cpp
@@ -728,14 +728,7 @@ bool TMainWindow::FileSave()
return false;
}
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup++; // turn checking on
-#endif /*Q_OS_WIN32*/
const bool isFileWritable = QFileInfo(curFile).isWritable();
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup--; // turn it off again
-#endif /*Q_OS_WIN32*/
-
if (not isFileWritable)
{
QMessageBox messageBox(this);
@@ -2593,13 +2586,7 @@ void TMainWindow::UpdateWindowTitle()
bool isFileWritable = true;
if (not curFile.isEmpty())
{
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup++; // turn checking on
-#endif /*Q_OS_WIN32*/
isFileWritable = QFileInfo(curFile).isWritable();
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup--; // turn it off again
-#endif /*Q_OS_WIN32*/
showName = StrippedName(curFile);
}
else
diff --git a/src/app/valentina/core/vvalentinasettings.cpp b/src/app/valentina/core/vvalentinasettings.cpp
index a12d2b050..e7cdd8849 100644
--- a/src/app/valentina/core/vvalentinasettings.cpp
+++ b/src/app/valentina/core/vvalentinasettings.cpp
@@ -53,6 +53,8 @@ Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingConfigurationLabelLanguage,
(QLatin1String("configuration/label_language")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingAutoRefreshPatternMessage,
(QLatin1String("configuration/autoRefreshPatternMessage")))
+Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingToolPanelScaling,
+ (QLatin1String("configuration/toolPanelScaling")))
Q_GLOBAL_STATIC_WITH_ARGS(const QString, settingPathsLayout, (QLatin1String("paths/layout")))
@@ -670,3 +672,15 @@ void VValentinaSettings::SetWatermarkEditorSize(const QSize &sz)
{
setValue(*settingWatermarkEditorSize, sz);
}
+
+//---------------------------------------------------------------------------------------------------------------------
+bool VValentinaSettings::GetToolPanelScaling() const
+{
+ return value(*settingToolPanelScaling, false).toBool();
+}
+
+//---------------------------------------------------------------------------------------------------------------------
+void VValentinaSettings::SetToolPanelScaling(const bool &value)
+{
+ setValue(*settingToolPanelScaling, value);
+}
diff --git a/src/app/valentina/core/vvalentinasettings.h b/src/app/valentina/core/vvalentinasettings.h
index 90b362b49..37d93988a 100644
--- a/src/app/valentina/core/vvalentinasettings.h
+++ b/src/app/valentina/core/vvalentinasettings.h
@@ -170,6 +170,9 @@ public:
QSize GetWatermarkEditorSize() const;
void SetWatermarkEditorSize(const QSize& sz);
+ bool GetToolPanelScaling() const;
+ void SetToolPanelScaling(const bool &value);
+
private:
Q_DISABLE_COPY(VValentinaSettings)
};
diff --git a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp
index 00dd4c869..b6aef1da3 100644
--- a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp
+++ b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.cpp
@@ -127,6 +127,9 @@ PreferencesConfigurationPage::PreferencesConfigurationPage(QWidget *parent)
// Theme
ui->darkModeCheck->setChecked(settings->GetDarkMode());
+ // Tool panel
+ ui->checkBoxToolPanelScaling->setChecked(settings->GetToolPanelScaling());
+
// Tab Scrolling
ui->spinBoxDuration->setMinimum(VValentinaSettings::scrollingDurationMin);
ui->spinBoxDuration->setMaximum(VValentinaSettings::scrollingDurationMax);
@@ -178,6 +181,11 @@ QStringList PreferencesConfigurationPage::Apply()
preferences.append(tr("dark mode"));
}
+ if (settings->GetToolPanelScaling() != ui->checkBoxToolPanelScaling->isChecked())
+ {
+ settings->SetToolPanelScaling(ui->checkBoxToolPanelScaling->isChecked());
+ }
+
settings->SetFreeCurveMode(ui->checkBoxFreeCurve->isChecked());
settings->SetDoubleClickZoomFitBestCurrentPP(ui->checkBoxZoomFitBestCurrentPP->isChecked());
diff --git a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.ui b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.ui
index c0af8bb3b..2433eb5b2 100644
--- a/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.ui
+++ b/src/app/valentina/dialogs/configpages/preferencesconfigurationpage.ui
@@ -33,9 +33,9 @@
0
- -152
+ -161
624
- 707
+ 717
@@ -273,6 +273,16 @@
+ -
+
+
+ Change the position of the tool panel to optimize for big screen resolutions. By default, the tool panel will take all available space.
+
+
+ Tool panel scaling
+
+
+
diff --git a/src/app/valentina/mainwindow.cpp b/src/app/valentina/mainwindow.cpp
index afb76e1d1..e35ddf542 100644
--- a/src/app/valentina/mainwindow.cpp
+++ b/src/app/valentina/mainwindow.cpp
@@ -652,6 +652,7 @@ void MainWindow::SetToolButton(bool checked, Tool t, const QString &cursor, cons
case Tool::Move:
case Tool::FlippingByAxis:
case Tool::FlippingByLine:
+ case Tool::Group:
dialogTool->SetGroupCategories(doc->GetGroupCategories());
break;
default:
@@ -3048,20 +3049,14 @@ bool MainWindow::on_actionSave_triggered()
{
return false;
}
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup++; // turn checking on
-#endif /*Q_OS_WIN32*/
- const bool isFileWritable = QFileInfo(qApp->GetPatternPath()).isWritable();
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup--; // turn it off again
-#endif /*Q_OS_WIN32*/
+ const bool isFileWritable = QFileInfo(qApp->GetPatternPath()).isWritable();
if (not isFileWritable)
{
QMessageBox messageBox(this);
messageBox.setIcon(QMessageBox::Question);
messageBox.setText(tr("The document has no write permissions."));
- messageBox.setInformativeText("Do you want to change the premissions?");
+ messageBox.setInformativeText(tr("Do you want to change the premissions?"));
messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
messageBox.setDefaultButton(QMessageBox::Yes);
@@ -4222,6 +4217,9 @@ void MainWindow::ReadSettings()
// Text under tool buton icon
ToolBarStyles();
+ // Tool box scaling
+ ToolBoxSizePolicy();
+
isDockToolOptionsVisible = ui->dockWidgetToolOptions->isEnabled();
isDockGroupsVisible = ui->dockWidgetGroups->isEnabled();
@@ -5229,6 +5227,14 @@ void MainWindow::ToolBarStyles()
ToolBarStyle(ui->mainToolBar);
}
+//---------------------------------------------------------------------------------------------------------------------
+void MainWindow::ToolBoxSizePolicy()
+{
+ ui->toolBox->setSizePolicy(ui->toolBox->sizePolicy().horizontalPolicy(),
+ qApp->ValentinaSettings()->GetToolPanelScaling() ? QSizePolicy::Fixed
+ : QSizePolicy::Preferred);
+}
+
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::ShowPaper(int index)
{
@@ -5260,6 +5266,7 @@ void MainWindow::Preferences()
connect(dlg.data(), &DialogPreferences::UpdateProperties, toolOptions,
&VToolOptionsPropertyBrowser::RefreshOptions);
connect(dlg.data(), &DialogPreferences::UpdateProperties, this, &MainWindow::ToolBarStyles);
+ connect(dlg.data(), &DialogPreferences::UpdateProperties, this, &MainWindow::ToolBoxSizePolicy);
connect(dlg.data(), &DialogPreferences::UpdateProperties, this, [this](){emit doc->FullUpdateFromFile();});
connect(dlg.data(), &DialogPreferences::UpdateProperties, ui->view,
&VMainGraphicsView::ResetScrollingAnimation);
@@ -5995,13 +6002,7 @@ void MainWindow::UpdateWindowTitle()
bool isFileWritable = true;
if (not qApp->GetPatternPath().isEmpty())
{
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup++; // turn checking on
-#endif /*Q_OS_WIN32*/
isFileWritable = QFileInfo(qApp->GetPatternPath()).isWritable();
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup--; // turn it off again
-#endif /*Q_OS_WIN32*/
}
if (not patternReadOnly && isFileWritable)
diff --git a/src/app/valentina/mainwindow.h b/src/app/valentina/mainwindow.h
index 2e4dbe494..5f4a40c31 100644
--- a/src/app/valentina/mainwindow.h
+++ b/src/app/valentina/mainwindow.h
@@ -122,6 +122,7 @@ private slots:
void PreviousPatternPiece();
void NextPatternPiece();
void ToolBarStyles();
+ void ToolBoxSizePolicy();
void ShowPaper(int index);
void Preferences();
#if defined(Q_OS_MAC)
diff --git a/src/app/valentina/watermarkwindow.cpp b/src/app/valentina/watermarkwindow.cpp
index 57bcf4c35..484009b50 100644
--- a/src/app/valentina/watermarkwindow.cpp
+++ b/src/app/valentina/watermarkwindow.cpp
@@ -358,20 +358,14 @@ bool WatermarkWindow::on_actionSave_triggered()
{
return false;
}
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup++; // turn checking on
-#endif /*Q_OS_WIN32*/
- const bool isFileWritable = QFileInfo(m_curFile).isWritable();
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup--; // turn it off again
-#endif /*Q_OS_WIN32*/
+ const bool isFileWritable = QFileInfo(m_curFile).isWritable();
if (not isFileWritable)
{
QMessageBox messageBox(this);
messageBox.setIcon(QMessageBox::Question);
messageBox.setText(tr("The document has no write permissions."));
- messageBox.setInformativeText("Do you want to change the premissions?");
+ messageBox.setInformativeText(tr("Do you want to change the premissions?"));
messageBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
messageBox.setDefaultButton(QMessageBox::Yes);
@@ -494,13 +488,7 @@ void WatermarkWindow::UpdateWindowTitle()
bool isFileWritable = true;
if (not m_curFile.isEmpty())
{
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup++; // turn checking on
-#endif /*Q_OS_WIN32*/
isFileWritable = QFileInfo(m_curFile).isWritable();
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup--; // turn it off again
-#endif /*Q_OS_WIN32*/
}
if (isFileWritable)
diff --git a/src/libs/ifc/xml/vabstractconverter.cpp b/src/libs/ifc/xml/vabstractconverter.cpp
index e1f69026d..b655fd52b 100644
--- a/src/libs/ifc/xml/vabstractconverter.cpp
+++ b/src/libs/ifc/xml/vabstractconverter.cpp
@@ -165,14 +165,7 @@ void VAbstractConverter::ReserveFile() const
.arg(info.absoluteDir().absolutePath(), info.baseName(), GetFormatVersionStr(), info.completeSuffix());
if (not SafeCopy(m_convertedFileName, reserveFileName, error))
{
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup++; // turn checking on
-#endif /*Q_OS_WIN32*/
const bool isFileWritable = info.isWritable();
-#ifdef Q_OS_WIN32
- qt_ntfs_permission_lookup--; // turn it off again
-#endif /*Q_OS_WIN32*/
-
if (not IsReadOnly() && isFileWritable)
{
const QString errorMsg(tr("Error creating a reserv copy: %1.").arg(error));
diff --git a/src/libs/qmuparser/qmudef.cpp b/src/libs/qmuparser/qmudef.cpp
index 608c85e60..4e69a74b2 100644
--- a/src/libs/qmuparser/qmudef.cpp
+++ b/src/libs/qmuparser/qmudef.cpp
@@ -323,8 +323,11 @@ QString NameRegExp()
//Same regexp in pattern.xsd shema file. Don't forget to synchronize.
// \p{Nd} - \p{Decimal_Digit_Number}
// \p{Zs} - \p{Space_Separator}
- regex = QString("^([^\\p{Nd}\\p{Zs}*/&|!<>^\n\\()%1%2%3%4=?:;'\"]){1,1}"
- "([^\\p{Zs}*/&|!<>^\n\\()%1%2%3%4=?:;\"]){0,}$")
+ // Here we use permanent start of string and end of string anchors \A and \z to match whole pattern as one
+ // string. In some cases, a user may pass multiline or line that ends with a new line. To cover case with a new
+ // line at the end of string use /z anchor.
+ regex = QString("\\A([^\\p{Nd}\\p{Zs}*/&|!<>^\\n\\()%1%2%3%4=?:;'\"]){1,1}"
+ "([^\\p{Zs}*/&|!<>^\\n\\()%1%2%3%4=?:;\"]){0,}\\z")
.arg(negativeSigns, positiveSigns, decimalPoints, groupSeparators);
}
diff --git a/src/libs/vgeometry/varc.cpp b/src/libs/vgeometry/varc.cpp
index 564407350..eac0ad5dc 100644
--- a/src/libs/vgeometry/varc.cpp
+++ b/src/libs/vgeometry/varc.cpp
@@ -379,7 +379,11 @@ void VArc::CreateName()
{
QString name = ARC_ + QString("%1").arg(this->GetCenter().name());
- if (VAbstractCurve::id() != NULL_ID)
+ if (getMode() == Draw::Modeling && getIdObject() != NULL_ID)
+ {
+ name += QString("_%1").arg(getIdObject());
+ }
+ else if (VAbstractCurve::id() != NULL_ID)
{
name += QString("_%1").arg(VAbstractCurve::id());
}
diff --git a/src/libs/vgeometry/vellipticalarc.cpp b/src/libs/vgeometry/vellipticalarc.cpp
index f85eddf28..a8eea6e57 100644
--- a/src/libs/vgeometry/vellipticalarc.cpp
+++ b/src/libs/vgeometry/vellipticalarc.cpp
@@ -381,7 +381,11 @@ void VEllipticalArc::CreateName()
{
QString name = ELARC_ + QString("%1").arg(this->GetCenter().name());
- if (VAbstractCurve::id() != NULL_ID)
+ if (getMode() == Draw::Modeling && getIdObject() != NULL_ID)
+ {
+ name += QString("_%1").arg(getIdObject());
+ }
+ else if (VAbstractCurve::id() != NULL_ID)
{
name += QString("_%1").arg(VAbstractCurve::id());
}
diff --git a/src/libs/vgeometry/vgeometrydef.h b/src/libs/vgeometry/vgeometrydef.h
index 3d4e9041c..e94279749 100644
--- a/src/libs/vgeometry/vgeometrydef.h
+++ b/src/libs/vgeometry/vgeometrydef.h
@@ -97,7 +97,7 @@ private:
};
Q_DECLARE_METATYPE(VLayoutPassmark)
-constexpr qreal accuracyPointOnLine = (0.12/*mm*/ / 25.4) * PrintDPI;
+constexpr qreal accuracyPointOnLine = (0.117/*mm*/ / 25.4) * PrintDPI;
Q_REQUIRED_RESULT static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2);
static inline bool VFuzzyComparePoints(const QPointF &p1, const QPointF &p2)
diff --git a/src/libs/vlayout/vabstractpiece.cpp b/src/libs/vlayout/vabstractpiece.cpp
index 8869ad633..eaefeca02 100644
--- a/src/libs/vlayout/vabstractpiece.cpp
+++ b/src/libs/vlayout/vabstractpiece.cpp
@@ -1527,6 +1527,7 @@ bool VAbstractPiece::IsAllowanceValid(const QVector &base, const QVecto
// DumpVector(base); // Uncomment for dumping test data
// DumpVector(allowance); // Uncomment for dumping test data
+ // First check direction
const qreal baseDirection = VPiece::SumTrapezoids(base);
const qreal allowanceDirection = VPiece::SumTrapezoids(allowance);
@@ -1535,6 +1536,7 @@ bool VAbstractPiece::IsAllowanceValid(const QVector &base, const QVecto
return false; // Wrong direction
}
+ // Edges must not intersect
for (auto i = 0; i < base.count(); ++i)
{
int nextI = -1;
@@ -1585,6 +1587,17 @@ bool VAbstractPiece::IsAllowanceValid(const QVector &base, const QVecto
}
}
+ // Just instersection edges is not enough. The base must be inside of the allowance.
+ QPolygonF allowancePolygon(allowance);
+
+ for (auto &point : base)
+ {
+ if (not allowancePolygon.containsPoint(point, Qt::WindingFill))
+ {
+ return false;
+ }
+ }
+
return true;
}
diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp
index ed6b5a2bb..5d23d76ab 100644
--- a/src/libs/vlayout/vlayoutpiece.cpp
+++ b/src/libs/vlayout/vlayoutpiece.cpp
@@ -1204,10 +1204,10 @@ void VLayoutPiece::CreateLabelStrings(QGraphicsItem *parent, const QVector(dW));
}
- if ((tl.m_eAlign & Qt::AlignLeft) > 0)
+
+ qreal dX = 0;
+ if (tl.m_eAlign == 0 || (tl.m_eAlign & Qt::AlignLeft) > 0)
{
dX = 0;
}
@@ -1247,7 +1249,7 @@ void VLayoutPiece::CreateLabelStrings(QGraphicsItem *parent, const QVector 0)
{
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
dX = dW - fm.horizontalAdvance(qsText);
diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp
index 428317032..47d30cdaa 100644
--- a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp
+++ b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.cpp
@@ -121,6 +121,8 @@ void DialogCubicBezierPath::SetPath(const VCubicBezierPath &value)
{
ui->listWidget->setCurrentRow(0);
}
+
+ ValidatePath();
}
//---------------------------------------------------------------------------------------------------------------------
@@ -219,7 +221,6 @@ void DialogCubicBezierPath::PointChanged(int row)
void DialogCubicBezierPath::currentPointChanged(int index)
{
const quint32 id = qvariant_cast(ui->comboBoxPoint->itemData(index));
- QColor color;
try
{
@@ -228,50 +229,16 @@ void DialogCubicBezierPath::currentPointChanged(int index)
DataPoint(*point);
item->setData(Qt::UserRole, QVariant::fromValue(*point));
- if (not IsPathValid())
- {
- flagError = false;
- color = errorColor;
-
- ui->lineEditSplPathName->setText(tr("Invalid spline path"));
- }
- else
- {
- flagError = true;
- color = OkColor(this);
-
- auto first = qvariant_cast(ui->listWidget->item(0)->data(Qt::UserRole));
- auto last = qvariant_cast(ui->listWidget->item(ui->listWidget->count()-1)->data(Qt::UserRole));
-
- if (first.id() == path.at(0).id() && last.id() == path.at(path.CountPoints()-1).id())
- {
- newDuplicate = -1;
- ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name()));
- }
- else
- {
- VCubicBezierPath newPath = ExtractPath();
-
- if (not data->IsUnique(newPath.name()))
- {
- newDuplicate = static_cast(DNumber(newPath.name()));
- newPath.SetDuplicate(static_cast(newDuplicate));
- }
-
- ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(newPath.name()));
- }
- }
+ ValidatePath();
}
catch (const VExceptionBadId &)
{
flagError = false;
- color = errorColor;
+ ChangeColor(ui->labelName, errorColor);
+ ChangeColor(ui->labelPoint, errorColor);
ui->lineEditSplPathName->setText(tr("Cannot find point with id %1").arg(id));
}
-
- ChangeColor(ui->labelName, color);
- ChangeColor(ui->labelPoint, color);
CheckState();
}
@@ -350,3 +317,46 @@ VCubicBezierPath DialogCubicBezierPath::ExtractPath() const
}
return VCubicBezierPath(points);
}
+
+//---------------------------------------------------------------------------------------------------------------------
+void DialogCubicBezierPath::ValidatePath()
+{
+ QColor color;
+
+ if (not IsPathValid())
+ {
+ flagError = false;
+ color = errorColor;
+
+ ui->lineEditSplPathName->setText(tr("Invalid spline path"));
+ }
+ else
+ {
+ flagError = true;
+ color = OkColor(this);
+
+ auto first = qvariant_cast(ui->listWidget->item(0)->data(Qt::UserRole));
+ auto last = qvariant_cast(ui->listWidget->item(ui->listWidget->count()-1)->data(Qt::UserRole));
+
+ if (first.id() == path.at(0).id() && last.id() == path.at(path.CountPoints()-1).id())
+ {
+ newDuplicate = -1;
+ ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name()));
+ }
+ else
+ {
+ VCubicBezierPath newPath = ExtractPath();
+
+ if (not data->IsUnique(newPath.name()))
+ {
+ newDuplicate = static_cast(DNumber(newPath.name()));
+ newPath.SetDuplicate(static_cast(newDuplicate));
+ }
+
+ ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(newPath.name()));
+ }
+ }
+
+ ChangeColor(ui->labelName, color);
+ ChangeColor(ui->labelPoint, color);
+}
diff --git a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.h b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.h
index f8fb418f9..00c9e946b 100644
--- a/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.h
+++ b/src/libs/vtools/dialogs/tools/dialogcubicbezierpath.h
@@ -84,6 +84,7 @@ private:
QSet AllPathBackboneIds() const;
bool IsPathValid() const;
VCubicBezierPath ExtractPath() const;
+ void ValidatePath();
};
//---------------------------------------------------------------------------------------------------------------------
diff --git a/src/libs/vtools/visualization/visualization.cpp b/src/libs/vtools/visualization/visualization.cpp
index b867dbbbd..9c75dc178 100644
--- a/src/libs/vtools/visualization/visualization.cpp
+++ b/src/libs/vtools/visualization/visualization.cpp
@@ -253,8 +253,12 @@ void Visualization::DrawLine(VScaledLine *lineItem, const QLineF &line, const QC
visPen.setStyle(style);
lineItem->setPen(visPen);
- lineItem->setLine(line);
- lineItem->setVisible(true);
+ if (not line.isNull())
+ {
+ lineItem->setLine(line);
+ }
+
+ lineItem->setVisible(not line.isNull());
}
//---------------------------------------------------------------------------------------------------------------------
diff --git a/src/test/ValentinaTest/share/Issue_923_test1/output.json b/src/test/ValentinaTest/share/Issue_923_test1/output.json
index 090b9889c..b3c98f8f3 100644
--- a/src/test/ValentinaTest/share/Issue_923_test1/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test1/output.json
@@ -162,8 +162,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test1_1/output.json b/src/test/ValentinaTest/share/Issue_923_test1_1/output.json
index 718f46e5c..927e0b346 100644
--- a/src/test/ValentinaTest/share/Issue_923_test1_1/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test1_1/output.json
@@ -157,8 +157,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test2/output.json b/src/test/ValentinaTest/share/Issue_923_test2/output.json
index 090b9889c..b3c98f8f3 100644
--- a/src/test/ValentinaTest/share/Issue_923_test2/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test2/output.json
@@ -162,8 +162,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test2_2/input.json b/src/test/ValentinaTest/share/Issue_923_test2_2/input.json
index 3dedc917b..28ab6e9bb 100644
--- a/src/test/ValentinaTest/share/Issue_923_test2_2/input.json
+++ b/src/test/ValentinaTest/share/Issue_923_test2_2/input.json
@@ -1,7 +1,7 @@
{
"vector": [
{
- "angle": 1,
+ "angle": 3,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
@@ -468,7 +468,7 @@
"y": 331.90352529002166
},
{
- "angle": 1,
+ "angle": 3,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
diff --git a/src/test/ValentinaTest/share/Issue_923_test2_2/output.json b/src/test/ValentinaTest/share/Issue_923_test2_2/output.json
index 47142d0c3..55db89d3f 100644
--- a/src/test/ValentinaTest/share/Issue_923_test2_2/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test2_2/output.json
@@ -2,13 +2,8 @@
"vector": [
{
"type": "QPointF",
- "x": -814.7149606299213,
- "y": 372.2542552635805
- },
- {
- "type": "QPointF",
- "x": -925.5802587835234,
- "y": 240.2611923642163
+ "x": -1086.319675233741,
+ "y": 603.286223243
},
{
"type": "QPointF",
@@ -162,8 +157,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
@@ -227,13 +222,13 @@
},
{
"type": "QPointF",
- "x": -810.1810632465665,
- "y": 373.5624561175904
+ "x": -807.3585969245805,
+ "y": 374.1796788445591
},
{
"type": "QPointF",
- "x": -814.7149606299213,
- "y": 372.2542552635805
+ "x": -1086.319675233741,
+ "y": 603.286223243
}
]
}
diff --git a/src/test/ValentinaTest/share/Issue_923_test3/output.json b/src/test/ValentinaTest/share/Issue_923_test3/output.json
index 090b9889c..b3c98f8f3 100644
--- a/src/test/ValentinaTest/share/Issue_923_test3/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test3/output.json
@@ -162,8 +162,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test3_3/output.json b/src/test/ValentinaTest/share/Issue_923_test3_3/output.json
index 7f76024df..5ccb7a046 100644
--- a/src/test/ValentinaTest/share/Issue_923_test3_3/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test3_3/output.json
@@ -162,8 +162,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test4/output.json b/src/test/ValentinaTest/share/Issue_923_test4/output.json
index 090b9889c..b3c98f8f3 100644
--- a/src/test/ValentinaTest/share/Issue_923_test4/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test4/output.json
@@ -162,8 +162,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test4_4/output.json b/src/test/ValentinaTest/share/Issue_923_test4_4/output.json
index 31f2a5a22..55db89d3f 100644
--- a/src/test/ValentinaTest/share/Issue_923_test4_4/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test4_4/output.json
@@ -157,8 +157,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test5/input.json b/src/test/ValentinaTest/share/Issue_923_test5/input.json
index 70c4f82ae..91f787aba 100644
--- a/src/test/ValentinaTest/share/Issue_923_test5/input.json
+++ b/src/test/ValentinaTest/share/Issue_923_test5/input.json
@@ -1,7 +1,7 @@
{
"vector": [
{
- "angle": 4,
+ "angle": 5,
"saAfter": 0,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
@@ -468,7 +468,7 @@
"y": 331.90352529002166
},
{
- "angle": 4,
+ "angle": 5,
"saAfter": 0,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
diff --git a/src/test/ValentinaTest/share/Issue_923_test5/output.json b/src/test/ValentinaTest/share/Issue_923_test5/output.json
index 090b9889c..b3c98f8f3 100644
--- a/src/test/ValentinaTest/share/Issue_923_test5/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test5/output.json
@@ -162,8 +162,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test5_5/input.json b/src/test/ValentinaTest/share/Issue_923_test5_5/input.json
index f592c08f7..a6670382c 100644
--- a/src/test/ValentinaTest/share/Issue_923_test5_5/input.json
+++ b/src/test/ValentinaTest/share/Issue_923_test5_5/input.json
@@ -1,7 +1,7 @@
{
"vector": [
{
- "angle": 4,
+ "angle": 5,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
@@ -468,7 +468,7 @@
"y": 331.90352529002166
},
{
- "angle": 4,
+ "angle": 5,
"saAfter": 151.18110236220474,
"saBefore": 37.795275590551185,
"type": "VSAPoint",
diff --git a/src/test/ValentinaTest/share/Issue_923_test5_5/output.json b/src/test/ValentinaTest/share/Issue_923_test5_5/output.json
index 8890c4742..914c5d73a 100644
--- a/src/test/ValentinaTest/share/Issue_923_test5_5/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test5_5/output.json
@@ -2,13 +2,8 @@
"vector": [
{
"type": "QPointF",
- "x": -949.5679059514944,
- "y": 269.4686510059864
- },
- {
- "type": "QPointF",
- "x": -925.5802587835218,
- "y": 240.26119236421337
+ "x": -831.5531621884526,
+ "y": 27.90388512315623
},
{
"type": "QPointF",
@@ -47,8 +42,8 @@
},
{
"type": "QPointF",
- "x": -631.5852394687809,
- "y": -90.99511806183605
+ "x": -631.8008980267215,
+ "y": -91.35633060009326
},
{
"type": "QPointF",
@@ -162,8 +157,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
@@ -232,28 +227,18 @@
},
{
"type": "QPointF",
- "x": -818.0929557813755,
- "y": 371.2795759163598
+ "x": -814.7149606299213,
+ "y": 372.2542552635805
},
{
"type": "QPointF",
- "x": -823.6929755287612,
- "y": 369.27180555079025
+ "x": -965.896062992126,
+ "y": 372.2542552635805
},
{
"type": "QPointF",
- "x": -829.5753368833404,
- "y": 366.62694879394627
- },
- {
- "type": "QPointF",
- "x": -835.8151397150936,
- "y": 362.8920896668543
- },
- {
- "type": "QPointF",
- "x": -949.5679059514944,
- "y": 269.4686510059864
+ "x": -831.5531621884526,
+ "y": 27.90388512315623
}
]
}
diff --git a/src/test/ValentinaTest/share/Issue_923_test6/output.json b/src/test/ValentinaTest/share/Issue_923_test6/output.json
index 090b9889c..b3c98f8f3 100644
--- a/src/test/ValentinaTest/share/Issue_923_test6/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test6/output.json
@@ -162,8 +162,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test6_6/output.json b/src/test/ValentinaTest/share/Issue_923_test6_6/output.json
index c9409bf35..914c5d73a 100644
--- a/src/test/ValentinaTest/share/Issue_923_test6_6/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test6_6/output.json
@@ -157,8 +157,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test7_1/output.json b/src/test/ValentinaTest/share/Issue_923_test7_1/output.json
index fad0cf5d6..26b81ae55 100644
--- a/src/test/ValentinaTest/share/Issue_923_test7_1/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test7_1/output.json
@@ -102,8 +102,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test7_2/output.json b/src/test/ValentinaTest/share/Issue_923_test7_2/output.json
index a3a2ba1ae..986fd3723 100644
--- a/src/test/ValentinaTest/share/Issue_923_test7_2/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test7_2/output.json
@@ -112,8 +112,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/Issue_923_test7_3/output.json b/src/test/ValentinaTest/share/Issue_923_test7_3/output.json
index 5c68e9293..d36efbda0 100644
--- a/src/test/ValentinaTest/share/Issue_923_test7_3/output.json
+++ b/src/test/ValentinaTest/share/Issue_923_test7_3/output.json
@@ -157,8 +157,8 @@
},
{
"type": "QPointF",
- "x": -414.7876067251059,
- "y": 388.13579550460213
+ "x": -415.23237001939634,
+ "y": 388.15813749078177
},
{
"type": "QPointF",
diff --git a/src/test/ValentinaTest/share/smart_pattern_#36/input.json b/src/test/ValentinaTest/share/smart_pattern_#36/input.json
new file mode 100644
index 000000000..84a1732e2
--- /dev/null
+++ b/src/test/ValentinaTest/share/smart_pattern_#36/input.json
@@ -0,0 +1,710 @@
+{
+ "vector": [
+ {
+ "type": "VSAPoint",
+ "x": -188.23334010667102,
+ "y": 21597.251791493014
+ },
+ {
+ "type": "VSAPoint",
+ "x": -188.23334010667102,
+ "y": 21597.251791493014
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -190.1962009592845,
+ "y": 21592.613481716297
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -192.78179634632448,
+ "y": 21582.00375313917
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -193.25596410665446,
+ "y": 21571.14352592585
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -191.60490646516234,
+ "y": 21560.348821082735
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -189.88869289465669,
+ "y": 21555.097277526158
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -187.82776163364855,
+ "y": 21549.97120094815
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -182.15384264181108,
+ "y": 21540.64069789316
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -174.80978957281837,
+ "y": 21532.62607034666
+ },
+ {
+ "type": "VSAPoint",
+ "x": -168.31266532018316,
+ "y": 21527.712497791887
+ },
+ {
+ "type": "VSAPoint",
+ "x": -168.31266532018316,
+ "y": 21527.712497791887
+ },
+ {
+ "type": "VSAPoint",
+ "x": -128.74015748031496,
+ "y": 21501.488243584587
+ },
+ {
+ "type": "VSAPoint",
+ "x": -128.74015748031496,
+ "y": 21501.488243584587
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -120.33246606279232,
+ "y": 21514.123269165208
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -104.47337041123777,
+ "y": 21539.200423564977
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -89.75071568383099,
+ "y": 21564.146905965034
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -76.15216444052632,
+ "y": 21589.074720936558
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -63.665379241278075,
+ "y": 21614.095873050734
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -52.278022646040554,
+ "y": 21639.32236687874
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -41.977757214768076,
+ "y": 21664.866206991763
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -32.752245507414955,
+ "y": 21690.839397960975
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -28.582677165354333,
+ "y": 21704.04689134986
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -20.859019636473,
+ "y": 21729.356389467157
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -6.6559976186818295,
+ "y": 21779.91855500826
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 2.3491950393391323,
+ "y": 21817.84792880411
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 7.419848382114216,
+ "y": 21843.158072724742
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 11.54949295787923,
+ "y": 21868.501152615463
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 14.60610066081589,
+ "y": 21893.88879293631
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 15.63779527559055,
+ "y": 21906.60553911513
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 17.326926706217673,
+ "y": 21931.92814003164
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 19.578089601275515,
+ "y": 21982.58857656685
+ },
+ {
+ "type": "VSAPoint",
+ "x": 20.500199521052405,
+ "y": 22010.688342216938
+ },
+ {
+ "type": "VSAPoint",
+ "x": 20.500199521052405,
+ "y": 22010.688342216938
+ },
+ {
+ "type": "VSAPoint",
+ "x": 20.500199521052405,
+ "y": 22010.688342216938
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 21.970984779797938,
+ "y": 22058.568844072717
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 24.330708661417322,
+ "y": 22109.1641868804
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 25.629921259842504,
+ "y": 22134.484017851057
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 27.31299212598423,
+ "y": 22185.123679792378
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 28.818897637795267,
+ "y": 22261.083172704355
+ },
+ {
+ "type": "VSAPoint",
+ "x": 30,
+ "y": 22311.722834645672
+ },
+ {
+ "type": "VSAPoint",
+ "x": 30,
+ "y": 22311.722834645672
+ },
+ {
+ "type": "VSAPoint",
+ "x": 30,
+ "y": 22311.722834645672
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 28.81889763779528,
+ "y": 22362.36249658699
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 27.312992125984252,
+ "y": 22438.321989498967
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 25.629921259842515,
+ "y": 22488.961651440288
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 24.330708661417322,
+ "y": 22514.281482410945
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 21.970984779797945,
+ "y": 22564.876825218627
+ },
+ {
+ "type": "VSAPoint",
+ "x": 20.500199521052405,
+ "y": 22612.757327074407
+ },
+ {
+ "type": "VSAPoint",
+ "x": 20.500199521052405,
+ "y": 22612.757327074407
+ },
+ {
+ "type": "VSAPoint",
+ "x": 20.500199521052405,
+ "y": 22612.757327074407
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 19.578089601275533,
+ "y": 22640.857092724495
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 17.32692670621769,
+ "y": 22691.517529259705
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 15.63779527559055,
+ "y": 22716.840130176213
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 14.606100660815876,
+ "y": 22729.556876355033
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 11.549492957879199,
+ "y": 22754.94451667588
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 7.419848382114184,
+ "y": 22780.287596566603
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": 2.3491950393391043,
+ "y": 22805.597740487236
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -6.655997618681845,
+ "y": 22843.527114283086
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -20.859019636473,
+ "y": 22894.089279824188
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -28.582677165354333,
+ "y": 22919.398777941486
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -32.75224550741497,
+ "y": 22932.60627133037
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -41.97775721476809,
+ "y": 22958.57946229958
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -52.27802264604057,
+ "y": 22984.123302412605
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -63.66537924127808,
+ "y": 23009.34979624061
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -76.15216444052632,
+ "y": 23034.370948354786
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -89.75071568383099,
+ "y": 23059.29876332631
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -104.47337041123777,
+ "y": 23084.245245726368
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -120.33246606279229,
+ "y": 23109.322400126137
+ },
+ {
+ "type": "VSAPoint",
+ "x": -128.74015748031496,
+ "y": 23121.957425706758
+ },
+ {
+ "type": "VSAPoint",
+ "x": -128.74015748031496,
+ "y": 23121.957425706758
+ },
+ {
+ "type": "VSAPoint",
+ "x": -168.31266532018316,
+ "y": 23095.733171499458
+ },
+ {
+ "type": "VSAPoint",
+ "x": -168.31266532018316,
+ "y": 23095.733171499458
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -171.93283235584602,
+ "y": 23093.234403464365
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -179.8307780091592,
+ "y": 23085.69291167279
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -186.08553237448535,
+ "y": 23076.802050183687
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -190.51508878378908,
+ "y": 23066.82053356537
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -191.90111533958498,
+ "y": 23061.472353582154
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -192.9291728004844,
+ "y": 23056.043983973945
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -193.18122374328198,
+ "y": 23045.12665305894
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -191.3172145200989,
+ "y": 23034.417085382996
+ },
+ {
+ "type": "VSAPoint",
+ "x": -188.23334010667102,
+ "y": 23026.19387779833
+ },
+ {
+ "type": "VSAPoint",
+ "x": -188.23334010667102,
+ "y": 23026.19387779833
+ },
+ {
+ "type": "VSAPoint",
+ "x": -188.23334010667102,
+ "y": 23026.19387779833
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -174.98561803383961,
+ "y": 22997.75607286171
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -153.44798018734235,
+ "y": 22947.63768649724
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -138.25149685012127,
+ "y": 22905.438343816088
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -130.36074869016556,
+ "y": 22879.905308764373
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -124.41592709594758,
+ "y": 22859.97405523269
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -112.95809590602803,
+ "y": 22818.998769537815
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -103.03301701424698,
+ "y": 22776.40775012916
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -97.38277143573882,
+ "y": 22743.14921078075
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -94.62664819253418,
+ "y": 22720.34981812865
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -93.66658986354132,
+ "y": 22708.71041822326
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -90.28950709466001,
+ "y": 22661.23204514134
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -86.63178802205015,
+ "y": 22586.936959736497
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -85.34331850360309,
+ "y": 22536.532014248543
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -85.22040001399614,
+ "y": 22511.20691337363
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -85.09747605487335,
+ "y": 22485.854069677924
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -83.94175824927609,
+ "y": 22435.343800520066
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -81.21332413858126,
+ "y": 22360.427969273227
+ },
+ {
+ "type": "VSAPoint",
+ "x": -79.60629921259843,
+ "y": 22311.722834645672
+ },
+ {
+ "type": "VSAPoint",
+ "x": -79.60629921259843,
+ "y": 22311.722834645672
+ },
+ {
+ "type": "VSAPoint",
+ "x": -79.60629921259843,
+ "y": 22311.722834645672
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -81.21332413858124,
+ "y": 22263.017700018117
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -83.94175824927609,
+ "y": 22188.10186877128
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -85.09747605487335,
+ "y": 22137.59159961342
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -85.22040001399614,
+ "y": 22112.238755917715
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -85.34331850360307,
+ "y": 22086.9136550428
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -86.63178802205015,
+ "y": 22036.508709554848
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -90.28950709466001,
+ "y": 21962.213624150005
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -93.66658986354132,
+ "y": 21914.735251068083
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -94.62664819253415,
+ "y": 21903.095851162696
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -97.38277143573879,
+ "y": 21880.296458510595
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -103.03301701424697,
+ "y": 21847.037919162183
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -112.95809590602803,
+ "y": 21804.44689975353
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -124.41592709594758,
+ "y": 21763.471614058653
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -130.36074869016556,
+ "y": 21743.54036052697
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -138.2514968501212,
+ "y": 21718.007325475257
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -153.4479801873423,
+ "y": 21675.807982794104
+ },
+ {
+ "angle": 6,
+ "type": "VSAPoint",
+ "x": -174.98561803383961,
+ "y": 21625.689596429635
+ },
+ {
+ "type": "VSAPoint",
+ "x": -188.23334010667102,
+ "y": 21597.251791493014
+ }
+ ]
+}
diff --git a/src/test/ValentinaTest/share/smart_pattern_#36/output.json b/src/test/ValentinaTest/share/smart_pattern_#36/output.json
new file mode 100644
index 000000000..9bfd97b5c
--- /dev/null
+++ b/src/test/ValentinaTest/share/smart_pattern_#36/output.json
@@ -0,0 +1,459 @@
+{
+ "vector": [
+ {
+ "type": "QPointF",
+ "x": -218.88332702810496,
+ "y": 21602.601187587297
+ },
+ {
+ "type": "QPointF",
+ "x": -222.85996685366638,
+ "y": 21586.28344916246
+ },
+ {
+ "type": "QPointF",
+ "x": -223.5926781800107,
+ "y": 21569.501600729036
+ },
+ {
+ "type": "QPointF",
+ "x": -221.11763913635318,
+ "y": 21553.31966057138
+ },
+ {
+ "type": "QPointF",
+ "x": -218.31711709775252,
+ "y": 21544.750177309146
+ },
+ {
+ "type": "QPointF",
+ "x": -214.95408378080705,
+ "y": 21536.38543140849
+ },
+ {
+ "type": "QPointF",
+ "x": -206.44852305285053,
+ "y": 21522.39842164138
+ },
+ {
+ "type": "QPointF",
+ "x": -195.24307496050506,
+ "y": 21510.16982087991
+ },
+ {
+ "type": "QPointF",
+ "x": -185.01522722202466,
+ "y": 21502.508262941858
+ },
+ {
+ "type": "QPointF",
+ "x": -120.2863407065389,
+ "y": 21459.613160579218
+ },
+ {
+ "type": "QPointF",
+ "x": -94.77769419281123,
+ "y": 21497.96212245061
+ },
+ {
+ "type": "QPointF",
+ "x": -78.43377590118915,
+ "y": 21523.83264733643
+ },
+ {
+ "type": "QPointF",
+ "x": -63.20717048632591,
+ "y": 21549.666946130616
+ },
+ {
+ "type": "QPointF",
+ "x": -49.09778488238641,
+ "y": 21575.57325526863
+ },
+ {
+ "type": "QPointF",
+ "x": -36.10682445695674,
+ "y": 21601.655813297744
+ },
+ {
+ "type": "QPointF",
+ "x": -24.23582343635048,
+ "y": 21628.0146663193
+ },
+ {
+ "type": "QPointF",
+ "x": -13.48549246436568,
+ "y": 21654.745936350544
+ },
+ {
+ "type": "QPointF",
+ "x": -3.9187457009163325,
+ "y": 21681.736743547735
+ },
+ {
+ "type": "QPointF",
+ "x": 8.250543876860249,
+ "y": 21721.17944990996
+ },
+ {
+ "type": "QPointF",
+ "x": 22.762455328454042,
+ "y": 21772.9340253423
+ },
+ {
+ "type": "QPointF",
+ "x": 31.996304179796386,
+ "y": 21811.90840457464
+ },
+ {
+ "type": "QPointF",
+ "x": 37.262465441143874,
+ "y": 21838.295230394753
+ },
+ {
+ "type": "QPointF",
+ "x": 41.568922145354556,
+ "y": 21864.886889244302
+ },
+ {
+ "type": "QPointF",
+ "x": 44.74330398553326,
+ "y": 21891.4437971853
+ },
+ {
+ "type": "QPointF",
+ "x": 45.774998600307924,
+ "y": 21904.16054336412
+ },
+ {
+ "type": "QPointF",
+ "x": 47.53333931071059,
+ "y": 21930.58587849783
+ },
+ {
+ "type": "QPointF",
+ "x": 49.78450220576843,
+ "y": 21981.24631503304
+ },
+ {
+ "type": "QPointF",
+ "x": 52.18502491930136,
+ "y": 22057.388558001505
+ },
+ {
+ "type": "QPointF",
+ "x": 55.849455392117505,
+ "y": 22133.479634813404
+ },
+ {
+ "type": "QPointF",
+ "x": 57.53252625825923,
+ "y": 22184.119296754725
+ },
+ {
+ "type": "QPointF",
+ "x": 60.22799967698306,
+ "y": 22312.42786229501
+ },
+ {
+ "type": "QPointF",
+ "x": 57.54327240149289,
+ "y": 22438.921308214038
+ },
+ {
+ "type": "QPointF",
+ "x": 55.826415279887826,
+ "y": 22490.511095648795
+ },
+ {
+ "type": "QPointF",
+ "x": 52.185024919301355,
+ "y": 22566.05711128984
+ },
+ {
+ "type": "QPointF",
+ "x": 49.799326331206146,
+ "y": 22641.80886946914
+ },
+ {
+ "type": "QPointF",
+ "x": 47.49610294540294,
+ "y": 22693.52994907348
+ },
+ {
+ "type": "QPointF",
+ "x": 45.806971514775746,
+ "y": 22718.852549989988
+ },
+ {
+ "type": "QPointF",
+ "x": 44.62552984829121,
+ "y": 22733.171139726193
+ },
+ {
+ "type": "QPointF",
+ "x": 41.39211001690886,
+ "y": 22759.80735900587
+ },
+ {
+ "type": "QPointF",
+ "x": 37.06695752257143,
+ "y": 22786.227120796073
+ },
+ {
+ "type": "QPointF",
+ "x": 31.767647986474977,
+ "y": 22812.582270153194
+ },
+ {
+ "type": "QPointF",
+ "x": 22.45356589465143,
+ "y": 22851.704053840283
+ },
+ {
+ "type": "QPointF",
+ "x": 8.060564966120161,
+ "y": 22902.91462145334
+ },
+ {
+ "type": "QPointF",
+ "x": -4.259980757012681,
+ "y": 22942.726541971588
+ },
+ {
+ "type": "QPointF",
+ "x": -13.935558005078015,
+ "y": 22969.88716285902
+ },
+ {
+ "type": "QPointF",
+ "x": -24.71946786171923,
+ "y": 22996.563362165594
+ },
+ {
+ "type": "QPointF",
+ "x": -36.61099968313795,
+ "y": 23022.851261908538
+ },
+ {
+ "type": "QPointF",
+ "x": -49.60861924302124,
+ "y": 23048.850908189204
+ },
+ {
+ "type": "QPointF",
+ "x": -63.711121173782374,
+ "y": 23074.66653955486
+ },
+ {
+ "type": "QPointF",
+ "x": -78.91859854125667,
+ "y": 23100.406392440964
+ },
+ {
+ "type": "QPointF",
+ "x": -95.16002058668974,
+ "y": 23126.07283347006
+ },
+ {
+ "type": "QPointF",
+ "x": -120.31315520567594,
+ "y": 23163.87280537214
+ },
+ {
+ "type": "QPointF",
+ "x": -190.8903779085056,
+ "y": 23116.939126378154
+ },
+ {
+ "type": "QPointF",
+ "x": -202.85525414075397,
+ "y": 23105.514254664224
+ },
+ {
+ "type": "QPointF",
+ "x": -212.52046074145298,
+ "y": 23091.775583546016
+ },
+ {
+ "type": "QPointF",
+ "x": -219.16064384809474,
+ "y": 23076.8126635822
+ },
+ {
+ "type": "QPointF",
+ "x": -221.42236580526438,
+ "y": 23068.085488732377
+ },
+ {
+ "type": "QPointF",
+ "x": -223.09995280587424,
+ "y": 23059.227460231446
+ },
+ {
+ "type": "QPointF",
+ "x": -223.47779299069944,
+ "y": 23042.861695894528
+ },
+ {
+ "type": "QPointF",
+ "x": -220.620815347658,
+ "y": 23026.447080003007
+ },
+ {
+ "type": "QPointF",
+ "x": -216.13435317554772,
+ "y": 23014.48384648047
+ },
+ {
+ "type": "QPointF",
+ "x": -202.58580499399324,
+ "y": 22985.400282661478
+ },
+ {
+ "type": "QPointF",
+ "x": -181.58729260253205,
+ "y": 22936.536448817904
+ },
+ {
+ "type": "QPointF",
+ "x": -166.93463706180071,
+ "y": 22895.847269707778
+ },
+ {
+ "type": "QPointF",
+ "x": -159.24892241489266,
+ "y": 22870.977686051203
+ },
+ {
+ "type": "QPointF",
+ "x": -153.4650960199354,
+ "y": 22851.581055284918
+ },
+ {
+ "type": "QPointF",
+ "x": -142.25531333403683,
+ "y": 22811.492836099398
+ },
+ {
+ "type": "QPointF",
+ "x": -132.6884639750548,
+ "y": 22770.439070061784
+ },
+ {
+ "type": "QPointF",
+ "x": -127.31338834414937,
+ "y": 22738.800239167223
+ },
+ {
+ "type": "QPointF",
+ "x": -124.71329691485195,
+ "y": 22717.29158364027
+ },
+ {
+ "type": "QPointF",
+ "x": -120.47293131191586,
+ "y": 22659.41580578265
+ },
+ {
+ "type": "QPointF",
+ "x": -116.84900303375213,
+ "y": 22585.80707433486
+ },
+ {
+ "type": "QPointF",
+ "x": -115.57766364654971,
+ "y": 22536.072259819528
+ },
+ {
+ "type": "QPointF",
+ "x": -115.32578480080944,
+ "y": 22485.162420331548
+ },
+ {
+ "type": "QPointF",
+ "x": -114.17006699521218,
+ "y": 22434.65215117369
+ },
+ {
+ "type": "QPointF",
+ "x": -109.85897382113086,
+ "y": 22311.722834645672
+ },
+ {
+ "type": "QPointF",
+ "x": -114.15794574601546,
+ "y": 22189.202342133005
+ },
+ {
+ "type": "QPointF",
+ "x": -115.33334113373941,
+ "y": 22137.738199035874
+ },
+ {
+ "type": "QPointF",
+ "x": -115.5776636465497,
+ "y": 22087.373409471817
+ },
+ {
+ "type": "QPointF",
+ "x": -116.84900303375211,
+ "y": 22037.638594956483
+ },
+ {
+ "type": "QPointF",
+ "x": -120.47293131191586,
+ "y": 21964.029863508695
+ },
+ {
+ "type": "QPointF",
+ "x": -124.71329691485192,
+ "y": 21906.154085651073
+ },
+ {
+ "type": "QPointF",
+ "x": -127.31338834414935,
+ "y": 21884.64543012412
+ },
+ {
+ "type": "QPointF",
+ "x": -132.68846397505476,
+ "y": 21853.00659922956
+ },
+ {
+ "type": "QPointF",
+ "x": -142.25531333403683,
+ "y": 21811.952833191946
+ },
+ {
+ "type": "QPointF",
+ "x": -153.4650960199354,
+ "y": 21771.864614006427
+ },
+ {
+ "type": "QPointF",
+ "x": -159.33558439851828,
+ "y": 21752.182578074156
+ },
+ {
+ "type": "QPointF",
+ "x": -166.9346370618007,
+ "y": 21727.598399583567
+ },
+ {
+ "type": "QPointF",
+ "x": -181.587292602532,
+ "y": 21686.90922047344
+ },
+ {
+ "type": "QPointF",
+ "x": -202.6152214315237,
+ "y": 21637.97693416576
+ },
+ {
+ "type": "QPointF",
+ "x": -218.88332702810496,
+ "y": 21602.601187587297
+ }
+ ]
+}
diff --git a/src/test/ValentinaTest/share/test_data.qrc b/src/test/ValentinaTest/share/test_data.qrc
index b471baf6c..2a535842c 100644
--- a/src/test/ValentinaTest/share/test_data.qrc
+++ b/src/test/ValentinaTest/share/test_data.qrc
@@ -115,5 +115,7 @@
Issue_604/output.json
Issue_548_case1/input.json
Issue_548_case1/output.json
+ smart_pattern_#36/input.json
+ smart_pattern_#36/output.json
diff --git a/src/test/ValentinaTest/tst_vabstractpiece.cpp b/src/test/ValentinaTest/tst_vabstractpiece.cpp
index eceed700c..7dfa25177 100644
--- a/src/test/ValentinaTest/tst_vabstractpiece.cpp
+++ b/src/test/ValentinaTest/tst_vabstractpiece.cpp
@@ -298,6 +298,12 @@ void TST_VAbstractPiece::EquidistantRemoveLoop_data()
QStringLiteral("://DP_6/input.json"),
QStringLiteral("://DP_6/output.json"),
37.795275590551185 /*seam allowance width (1.0 cm)*/);
+
+ // See file src/app/share/collection/bugs/smart_pattern_#36.val
+ ASSERT_TEST_CASE("Incorrect position of a notch",
+ QStringLiteral("://smart_pattern_#36/input.json"),
+ QStringLiteral("://smart_pattern_#36/output.json"),
+ 30.236220472440944 /*seam allowance width (0.8 cm)*/);
}
//---------------------------------------------------------------------------------------------------------------------