diff --git a/ChangeLog.txt b/ChangeLog.txt
index 322e9ca3c..59e7efeca 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -2,6 +2,7 @@
- Fix Puzzle app crash when application closing.
- Dialog Table of variables. Added button Close.
- Fix incorrect seam allowance.
+- Duplicate controls for main path nodes.
# Valentina 0.7.53 June 25, 2024
- Fix layout sheet export with empty name.
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/add-placemark.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/add-placemark.svg
new file mode 100644
index 000000000..1f116a76d
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/add-placemark.svg
@@ -0,0 +1,56 @@
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/gtk-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/gtk-remove.svg
index e24bf8289..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/gtk-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/gtk-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/list-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/list-remove.svg
index 5e6b073cb..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/list-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/list-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove-amarok.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove-amarok.svg
index e24bf8289..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove-amarok.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove-amarok.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove.svg
index e24bf8289..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/snap-nodes-rotation-center.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/snap-nodes-rotation-center.svg
new file mode 100644
index 000000000..e95d441bb
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22/snap-nodes-rotation-center.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/add-placemark.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/add-placemark.svg
new file mode 100644
index 000000000..1f116a76d
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/add-placemark.svg
@@ -0,0 +1,56 @@
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/gtk-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/gtk-remove.svg
index e24bf8289..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/gtk-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/gtk-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/list-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/list-remove.svg
index 5e6b073cb..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/list-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/list-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove-amarok.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove-amarok.svg
index e24bf8289..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove-amarok.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove-amarok.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove.svg
index e24bf8289..d4f8ef445 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/snap-nodes-rotation-center.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/snap-nodes-rotation-center.svg
new file mode 100644
index 000000000..e95d441bb
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Dark/actions/22x22@2x/snap-nodes-rotation-center.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/add-placemark.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/add-placemark.svg
new file mode 100644
index 000000000..eb5e3f07a
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/add-placemark.svg
@@ -0,0 +1,56 @@
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/gtk-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/gtk-remove.svg
index e24bf8289..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/gtk-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/gtk-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/list-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/list-remove.svg
index 5e6b073cb..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/list-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/list-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove-amarok.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove-amarok.svg
index e24bf8289..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove-amarok.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove-amarok.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove.svg
index e24bf8289..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/snap-nodes-rotation-center.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/snap-nodes-rotation-center.svg
new file mode 100644
index 000000000..4e30a9943
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22/snap-nodes-rotation-center.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/add-placemark.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/add-placemark.svg
new file mode 100644
index 000000000..eb5e3f07a
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/add-placemark.svg
@@ -0,0 +1,56 @@
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/gtk-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/gtk-remove.svg
index e24bf8289..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/gtk-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/gtk-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/list-remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/list-remove.svg
index 5e6b073cb..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/list-remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/list-remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove-amarok.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove-amarok.svg
index e24bf8289..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove-amarok.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove-amarok.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove.svg
index e24bf8289..b75894015 100644
--- a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove.svg
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/remove.svg
@@ -1 +1,37 @@
-
\ No newline at end of file
+
+
diff --git a/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/snap-nodes-rotation-center.svg b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/snap-nodes-rotation-center.svg
new file mode 100644
index 000000000..4e30a9943
--- /dev/null
+++ b/src/libs/vmisc/share/resources/icons/La-Sierra-Light/actions/22x22@2x/snap-nodes-rotation-center.svg
@@ -0,0 +1,55 @@
+
+
diff --git a/src/libs/vmisc/share/resources/mac_dark_theme.qrc b/src/libs/vmisc/share/resources/mac_dark_theme.qrc
index 076750650..80c6140c4 100644
--- a/src/libs/vmisc/share/resources/mac_dark_theme.qrc
+++ b/src/libs/vmisc/share/resources/mac_dark_theme.qrc
@@ -166,7 +166,7 @@
-
+ icons/La-Sierra-Dark/actions/22x22/draw-star.svg
@@ -271,7 +271,7 @@
icons/La-Sierra-Dark/actions/22x22/format-text-italic.svg
-
+ icons/La-Sierra-Dark/actions/22x22/format-text-strikethrough.svg
@@ -1674,7 +1674,7 @@
-
+ icons/La-Sierra-Dark/actions/22x22@2x/draw-star.svg
@@ -1779,7 +1779,7 @@
icons/La-Sierra-Dark/actions/22x22@2x/format-text-italic.svg
-
+ icons/La-Sierra-Dark/actions/22x22@2x/format-text-strikethrough.svg
@@ -4271,5 +4271,9 @@
icons/La-Sierra-Dark/index.theme
+ icons/La-Sierra-Dark/actions/22x22/snap-nodes-rotation-center.svg
+ icons/La-Sierra-Dark/actions/22x22/add-placemark.svg
+ icons/La-Sierra-Dark/actions/22x22@2x/snap-nodes-rotation-center.svg
+ icons/La-Sierra-Dark/actions/22x22@2x/add-placemark.svg
diff --git a/src/libs/vmisc/share/resources/mac_light_theme.qrc b/src/libs/vmisc/share/resources/mac_light_theme.qrc
index d06900e8a..1ad256f87 100644
--- a/src/libs/vmisc/share/resources/mac_light_theme.qrc
+++ b/src/libs/vmisc/share/resources/mac_light_theme.qrc
@@ -386,7 +386,7 @@
-
+ icons/La-Sierra-Light/actions/22x22/draw-star.svg
@@ -491,7 +491,7 @@
icons/La-Sierra-Light/actions/22x22/format-text-italic.svg
-
+ icons/La-Sierra-Light/actions/22x22/format-text-strikethrough.svg
@@ -1894,7 +1894,7 @@
-
+ icons/La-Sierra-Light/actions/22x22@2x/draw-star.svg
@@ -1999,7 +1999,7 @@
icons/La-Sierra-Light/actions/22x22@2x/format-text-italic.svg
-
+ icons/La-Sierra-Light/actions/22x22@2x/format-text-strikethrough.svg
@@ -4271,5 +4271,9 @@
icons/La-Sierra-Light/index.theme
+ icons/La-Sierra-Light/actions/22x22/snap-nodes-rotation-center.svg
+ icons/La-Sierra-Light/actions/22x22/add-placemark.svg
+ icons/La-Sierra-Light/actions/22x22@2x/snap-nodes-rotation-center.svg
+ icons/La-Sierra-Light/actions/22x22@2x/add-placemark.svg
diff --git a/src/libs/vmisc/share/resources/win_dark_theme.qrc b/src/libs/vmisc/share/resources/win_dark_theme.qrc
index b644c8d8b..2536591bb 100644
--- a/src/libs/vmisc/share/resources/win_dark_theme.qrc
+++ b/src/libs/vmisc/share/resources/win_dark_theme.qrc
@@ -245,7 +245,7 @@
-
+ icons/Eleven-Dark/16/actions/draw-star.svg
@@ -427,7 +427,7 @@
icons/Eleven-Dark/16/actions/format-text-italic.svg
-
+ icons/Eleven-Dark/16/actions/format-text-strikethrough.svg
@@ -852,7 +852,7 @@
-
+ icons/Eleven-Dark/16/actions/snap-nodes-rotation-center.svg
@@ -1131,7 +1131,7 @@
-
+ icons/Eleven-Dark/16/actions/add-placemark.svg
@@ -8180,7 +8180,7 @@
-
+ icons/Eleven-Dark/16@2x/actions/draw-star.svg
@@ -8362,7 +8362,7 @@
icons/Eleven-Dark/16@2x/actions/format-text-italic.svg
-
+ icons/Eleven-Dark/16@2x/actions/format-text-strikethrough.svg
@@ -8787,7 +8787,7 @@
-
+ icons/Eleven-Dark/16@2x/actions/snap-nodes-rotation-center.svg
@@ -9066,7 +9066,7 @@
-
+ icons/Eleven-Dark/16@2x/actions/add-placemark.svg
diff --git a/src/libs/vmisc/share/resources/win_light_theme.qrc b/src/libs/vmisc/share/resources/win_light_theme.qrc
index 1cc8bfe5e..fa7419a75 100644
--- a/src/libs/vmisc/share/resources/win_light_theme.qrc
+++ b/src/libs/vmisc/share/resources/win_light_theme.qrc
@@ -245,7 +245,7 @@
-
+ icons/Eleven-Light/16/actions/draw-star.svg
@@ -427,7 +427,7 @@
icons/Eleven-Light/16/actions/format-text-italic.svg
-
+ icons/Eleven-Light/16/actions/format-text-strikethrough.svg
@@ -851,7 +851,7 @@
-
+ icons/Eleven-Light/16/actions/snap-nodes-rotation-center.svg
@@ -1131,7 +1131,7 @@
-
+ icons/Eleven-Light/16/actions/add-placemark.svg
@@ -7273,7 +7273,7 @@
-
+ icons/Eleven-Light/16@2x/actions/draw-star.svg
@@ -7455,7 +7455,7 @@
icons/Eleven-Light/16@2x/actions/format-text-italic.svg
-
+ icons/Eleven-Light/16@2x/actions/format-text-strikethrough.svg
@@ -7879,7 +7879,7 @@
-
+ icons/Eleven-Light/16@2x/actions/snap-nodes-rotation-center.svg
@@ -8159,7 +8159,7 @@
-
+ icons/Eleven-Light/16@2x/actions/add-placemark.svg
diff --git a/src/libs/vmisc/theme/themeDef.cpp b/src/libs/vmisc/theme/themeDef.cpp
index 422c6d918..8fd3798ce 100644
--- a/src/libs/vmisc/theme/themeDef.cpp
+++ b/src/libs/vmisc/theme/themeDef.cpp
@@ -357,7 +357,10 @@ Q_GLOBAL_STATIC_WITH_ARGS(const ThemeIconStringHash, themeIconStringMapping,
{VThemeIcon::PreferencesOther, "preferences-other"_L1},
{VThemeIcon::GtkOk, "gtk-ok"_L1},
- {VThemeIcon::GtkNo, "gtk-no"_L1}}))
+ {VThemeIcon::GtkNo, "gtk-no"_L1},
+ {VThemeIcon::SnapNodesRotationCenter, "snap-nodes-rotation-center"_L1},
+ {VThemeIcon::DrawStar, "draw-star"_L1},
+ {VThemeIcon::AddPlacemark, "add-placemark"_L1}}))
QT_WARNING_POP
} // namespace
diff --git a/src/libs/vmisc/theme/themeDef.h b/src/libs/vmisc/theme/themeDef.h
index b4692d7a4..d0e820a81 100644
--- a/src/libs/vmisc/theme/themeDef.h
+++ b/src/libs/vmisc/theme/themeDef.h
@@ -227,7 +227,10 @@ enum class VThemeIcon
// Not supported by Qt
PreferencesOther,
GtkOk,
- GtkNo
+ GtkNo,
+ SnapNodesRotationCenter,
+ DrawStar,
+ AddPlacemark
};
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp
index f054e8caa..c5d300d1e 100644
--- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp
+++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp
@@ -3783,6 +3783,8 @@ void DialogSeamAllowance::InitMainPathTab()
&DialogSeamAllowance::ListChanged);
connect(uiTabPaths->listWidgetMainPath, &QListWidget::itemSelectionChanged, this,
&DialogSeamAllowance::SetMoveControls);
+ connect(uiTabPaths->listWidgetMainPath, &QListWidget::itemSelectionChanged, this,
+ &DialogSeamAllowance::SetOptionControls);
connect(uiTabPaths->listWidgetMainPath->model(), &QAbstractItemModel::rowsMoved, this,
[this]() { ValidObjects(MainPathIsValid()); });
@@ -3816,6 +3818,115 @@ void DialogSeamAllowance::InitMainPathTab()
&DialogSeamAllowance::MirrorLinePointChanged);
connect(uiTabPaths->comboBoxMLEndPoint, QOverload::of(&QComboBox::currentIndexChanged), this,
&DialogSeamAllowance::MirrorLinePointChanged);
+
+ connect(uiTabPaths->toolButtonReverse, &QToolButton::toggled, this,
+ [this]()
+ {
+ const int row = uiTabPaths->listWidgetMainPath->currentRow();
+ if (row < 0)
+ {
+ uiTabPaths->toolButtonReverse->setEnabled(false);
+ return;
+ }
+
+ QListWidgetItem *rowItem = uiTabPaths->listWidgetMainPath->item(row);
+ SCASSERT(rowItem != nullptr);
+ auto rowNode = qvariant_cast(rowItem->data(Qt::UserRole));
+
+ rowNode.SetReverse(not rowNode.GetReverse());
+ rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));
+ rowItem->setText(GetNodeName(data, rowNode, true));
+ });
+
+ connect(uiTabPaths->toolButtonExcluded, &QToolButton::toggled, this,
+ [this]()
+ {
+ const int row = uiTabPaths->listWidgetMainPath->currentRow();
+ if (row < 0)
+ {
+ uiTabPaths->toolButtonExcluded->setEnabled(false);
+ return;
+ }
+
+ QListWidgetItem *rowItem = uiTabPaths->listWidgetMainPath->item(row);
+ SCASSERT(rowItem != nullptr);
+ auto rowNode = qvariant_cast(rowItem->data(Qt::UserRole));
+
+ rowNode.SetExcluded(not rowNode.IsExcluded());
+ rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));
+ rowItem->setText(GetNodeName(data, rowNode, true));
+ rowItem->setFont(NodeFont(rowItem->font(), rowNode.IsExcluded()));
+ });
+
+ connect(uiTabPaths->toolButtonTurnPoint, &QToolButton::toggled, this,
+ [this]()
+ {
+ const int row = uiTabPaths->listWidgetMainPath->currentRow();
+ if (row < 0)
+ {
+ uiTabPaths->toolButtonTurnPoint->setEnabled(false);
+ return;
+ }
+
+ QListWidgetItem *rowItem = uiTabPaths->listWidgetMainPath->item(row);
+ SCASSERT(rowItem != nullptr);
+ auto rowNode = qvariant_cast(rowItem->data(Qt::UserRole));
+
+ rowNode.SetTurnPoint(not rowNode.IsTurnPoint());
+ rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));
+ rowItem->setText(GetNodeName(data, rowNode, true));
+ });
+
+ connect(uiTabPaths->toolButtonCheckUniqness, &QToolButton::toggled, this,
+ [this]()
+ {
+ const int row = uiTabPaths->listWidgetMainPath->currentRow();
+ if (row < 0)
+ {
+ uiTabPaths->toolButtonCheckUniqness->setEnabled(false);
+ return;
+ }
+
+ QListWidgetItem *rowItem = uiTabPaths->listWidgetMainPath->item(row);
+ SCASSERT(rowItem != nullptr);
+ auto rowNode = qvariant_cast(rowItem->data(Qt::UserRole));
+
+ rowNode.SetCheckUniqueness(not rowNode.IsCheckUniqueness());
+ rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));
+ rowItem->setText(GetNodeName(data, rowNode, true));
+ });
+
+ connect(uiTabPaths->toolButtonPassmark, &QToolButton::toggled, this,
+ [this](bool checked)
+ {
+ const int row = uiTabPaths->listWidgetMainPath->currentRow();
+ if (row < 0)
+ {
+ uiTabPaths->toolButtonPassmark->setEnabled(false);
+ return;
+ }
+
+ QListWidgetItem *rowItem = uiTabPaths->listWidgetMainPath->item(row);
+ SCASSERT(rowItem != nullptr);
+ auto rowNode = qvariant_cast(rowItem->data(Qt::UserRole));
+
+ rowNode.SetPassmark(checked);
+ rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));
+ rowItem->setText(GetNodeName(data, rowNode, true));
+ });
+
+ connect(uiTabPaths->toolButtonDelete, &QToolButton::clicked, this,
+ [this]()
+ {
+ const int row = uiTabPaths->listWidgetMainPath->currentRow();
+ if (row < 0)
+ {
+ uiTabPaths->toolButtonDelete->setEnabled(false);
+ return;
+ }
+
+ delete uiTabPaths->listWidgetMainPath->item(row);
+ });
}
//---------------------------------------------------------------------------------------------------------------------
@@ -5300,7 +5411,8 @@ auto DialogSeamAllowance::InitMainPathContextMenu(QMenu *menu, const VPieceNode
if (rowNode.GetTypeTool() != Tool::NodePoint)
{
- QAction *actionReverse = menu->addAction(QApplication::translate("DialogSeamAllowance", "Reverse"));
+ QAction *actionReverse = menu->addAction(FromTheme(VThemeIcon::ListRemove),
+ QApplication::translate("DialogSeamAllowance", "Reverse"));
actionReverse->setCheckable(true);
actionReverse->setChecked(rowNode.GetReverse());
contextMenu.insert(static_cast(MainPathContextMenuOption::Reverse), actionReverse);
@@ -5309,7 +5421,8 @@ auto DialogSeamAllowance::InitMainPathContextMenu(QMenu *menu, const VPieceNode
{
if (applyAllowed)
{
- QMenu *passmarkSubmenu = menu->addMenu(QApplication::translate("DialogSeamAllowance", "Passmark"));
+ QMenu *passmarkSubmenu = menu->addMenu(FromTheme(VThemeIcon::AddPlacemark),
+ QApplication::translate("DialogSeamAllowance", "Passmark"));
QAction *actionNonePassmark =
passmarkSubmenu->addAction(QApplication::translate("DialogSeamAllowance", "None"));
@@ -5359,18 +5472,21 @@ auto DialogSeamAllowance::InitMainPathContextMenu(QMenu *menu, const VPieceNode
PassmarkLineType::CheckMark));
}
- QAction *actionUniqueness = menu->addAction(QApplication::translate("DialogSeamAllowance", "Check uniqueness"));
+ QAction *actionUniqueness = menu->addAction(FromTheme(VThemeIcon::DrawStar),
+ QApplication::translate("DialogSeamAllowance", "Check uniqueness"));
actionUniqueness->setCheckable(true);
actionUniqueness->setChecked(rowNode.IsCheckUniqueness());
contextMenu.insert(static_cast(MainPathContextMenuOption::Uniqueness), actionUniqueness);
- QAction *actionTurnPoint = menu->addAction(QApplication::translate("DialogSeamAllowance", "Turn point"));
+ QAction *actionTurnPoint = menu->addAction(FromTheme(VThemeIcon::SnapNodesRotationCenter),
+ QApplication::translate("DialogSeamAllowance", "Turn point"));
actionTurnPoint->setCheckable(true);
actionTurnPoint->setChecked(rowNode.IsTurnPoint());
contextMenu.insert(static_cast(MainPathContextMenuOption::TurnPoint), actionTurnPoint);
}
- QAction *actionExcluded = menu->addAction(QApplication::translate("DialogSeamAllowance", "Excluded"));
+ QAction *actionExcluded = menu->addAction(FromTheme(VThemeIcon::FormatTextStrikethrough),
+ QApplication::translate("DialogSeamAllowance", "Excluded"));
actionExcluded->setCheckable(true);
actionExcluded->setChecked(rowNode.IsExcluded());
contextMenu.insert(static_cast(MainPathContextMenuOption::Excluded), actionExcluded);
@@ -5412,6 +5528,63 @@ void DialogSeamAllowance::SetMoveControls()
}
}
+//---------------------------------------------------------------------------------------------------------------------
+void DialogSeamAllowance::SetOptionControls()
+{
+ uiTabPaths->toolButtonReverse->setEnabled(false);
+ uiTabPaths->toolButtonExcluded->setEnabled(false);
+ uiTabPaths->toolButtonTurnPoint->setEnabled(false);
+ uiTabPaths->toolButtonCheckUniqness->setEnabled(false);
+ uiTabPaths->toolButtonPassmark->setEnabled(false);
+ uiTabPaths->toolButtonDelete->setEnabled(false);
+
+ auto SetChecked = [](QToolButton *toolButton, bool checked = false)
+ {
+ toolButton->blockSignals(true);
+ toolButton->setChecked(checked);
+ toolButton->blockSignals(false);
+ };
+
+ SetChecked(uiTabPaths->toolButtonReverse);
+ SetChecked(uiTabPaths->toolButtonExcluded);
+ SetChecked(uiTabPaths->toolButtonTurnPoint);
+ SetChecked(uiTabPaths->toolButtonCheckUniqness);
+ SetChecked(uiTabPaths->toolButtonPassmark);
+ SetChecked(uiTabPaths->toolButtonDelete);
+
+ const int row = uiTabPaths->listWidgetMainPath->currentRow();
+ if (row < 0)
+ {
+ return;
+ }
+
+ QListWidgetItem *rowItem = uiTabPaths->listWidgetMainPath->item(row);
+ SCASSERT(rowItem != nullptr);
+ auto rowNode = qvariant_cast(rowItem->data(Qt::UserRole));
+
+ if (rowNode.GetTypeTool() != Tool::NodePoint)
+ {
+ uiTabPaths->toolButtonReverse->setEnabled(true);
+ SetChecked(uiTabPaths->toolButtonReverse, rowNode.GetReverse());
+ }
+ else
+ {
+ uiTabPaths->toolButtonPassmark->setEnabled(true);
+ SetChecked(uiTabPaths->toolButtonPassmark, rowNode.IsPassmark());
+
+ uiTabPaths->toolButtonCheckUniqness->setEnabled(true);
+ SetChecked(uiTabPaths->toolButtonCheckUniqness, rowNode.IsCheckUniqueness());
+
+ uiTabPaths->toolButtonTurnPoint->setEnabled(true);
+ SetChecked(uiTabPaths->toolButtonTurnPoint, rowNode.IsTurnPoint());
+ }
+
+ uiTabPaths->toolButtonExcluded->setEnabled(true);
+ SetChecked(uiTabPaths->toolButtonExcluded, rowNode.IsExcluded());
+
+ uiTabPaths->toolButtonDelete->setEnabled(true);
+}
+
//---------------------------------------------------------------------------------------------------------------------
void DialogSeamAllowance::PatternLabelDataChanged()
{
diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h
index cdde605fc..9e9a8828c 100644
--- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h
+++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.h
@@ -179,6 +179,7 @@ private slots:
void EditPieceLabel();
void SetMoveControls();
+ void SetOptionControls();
void PatternLabelDataChanged();
void EditPatternLabel();
diff --git a/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui b/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui
index 3feddc259..f7ce35696 100644
--- a/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui
+++ b/src/libs/vtools/dialogs/tools/piece/tabs/tabpaths.ui
@@ -6,8 +6,8 @@
0
0
- 591
- 789
+ 573
+ 662
@@ -28,8 +28,8 @@
0
0
- 571
- 769
+ 553
+ 642
@@ -106,6 +106,121 @@
+ -
+
+
-
+
+
+ false
+
+
+ Reverse node direction
+
+
+ ...
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ false
+
+
+ Excluded node
+
+
+ ...
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ false
+
+
+ Turn point
+
+
+ ...
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ false
+
+
+ Check node uniqness
+
+
+ ...
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ false
+
+
+ Notch
+
+
+ ...
+
+
+
+
+
+ true
+
+
+
+ -
+
+
+ false
+
+
+ Delete node
+
+
+ ...
+
+
+
+
+
+
+
+
-