Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Remove union tool retain pieces option #1216

Merged
merged 3 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions share/translations/seamly2d_cs_CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11862,10 +11862,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_de_DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11886,10 +11886,6 @@ wie gewohnt in SeamlyME laden können.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Sollen die Details wirklich vereinigt werden?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation>Die Original Schnittteile zurückbehalten</translation>
</message>
<message>
<source>Select the first point</source>
<translation>Den ersten Punkt auswählen</translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_el_GR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11863,10 +11863,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Διατήρηση αρχικών κομματιών</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_en_CA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11866,10 +11866,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Retain original pieces</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_en_GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11866,10 +11866,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Retain original pieces</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_en_IN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11866,10 +11866,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Retain original pieces</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11866,10 +11866,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Retain original pieces</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_es_ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11946,10 +11946,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;¿Desea unir los detalles?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation>Conservar las piezas originales</translation>
</message>
<message>
<source>Select the first point</source>
<translation>Seleccione primer punto</translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_fi_FI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11862,10 +11862,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_fr_FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11866,10 +11866,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Voulez-vous vraiment rassembler les pièces de patron?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Mémoriser les pièces originales</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_he_IL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11861,10 +11861,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_id_ID.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11862,10 +11862,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_it_IT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11866,10 +11866,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Vuoi veramente unire i dettagli?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Conserva pezzi originali</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_nl_NL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11876,10 +11876,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Wil je echt details verenigen?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation>Behoud originele stukken</translation>
</message>
<message>
<source>Select the first point</source>
<translation>Kies het eerste punt</translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_pt_BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11861,10 +11861,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_ro_RO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11861,10 +11861,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_ru_RU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11904,10 +11904,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;р&gt;Вы действительно хотите объединить детали?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation>Сохранить оригинальную выкройку</translation>
</message>
<message>
<source>Select the first point</source>
<translation>Выберите первую точку</translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_uk_UA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11865,10 +11865,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Чи ви справді хочете об&apos;єднати деталі?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished">Зберегти оригінальні деталі</translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
4 changes: 0 additions & 4 deletions share/translations/seamly2d_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11861,10 +11861,6 @@ load in SeamlyME as usual.
<source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Retain original pieces</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Select the first point</source>
<translation type="unfinished"></translation>
Expand Down
15 changes: 2 additions & 13 deletions src/libs/vtools/dialogs/tools/union_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,6 @@ UnionDialog::~UnionDialog()
delete ui;
}

//---------------------------------------------------------------------------------------------------------------------
bool UnionDialog::retainPieces() const
{
return ui->checkBox->isChecked();
}

//---------------------------------------------------------------------------------------------------------------------
/**
* @brief ChosenObject gets id and type of selected object. Save correct data and ignore wrong.
Expand Down Expand Up @@ -136,18 +130,13 @@ bool UnionDialog::CheckObject(const quint32 &id, const quint32 &pieceId) const
}

//---------------------------------------------------------------------------------------------------------------------
bool UnionDialog::checkPiece(const quint32 &pieceId) const
bool UnionDialog::isPieceValid(const quint32 &pieceId) const
{
if (pieceId == NULL_ID)
{
return false;
}
const VPiece piece = data->GetPiece(pieceId);
if (piece.isLocked())
{
ui->checkBox->setChecked(true);
ui->checkBox->setEnabled(false);
}
if (piece.GetPath().CountNodes() >= 3 && piece.GetPath().ListNodePoint().size() >= 2)
{
return true;
Expand All @@ -174,7 +163,7 @@ void UnionDialog::chosenPiece(const quint32 &id, const SceneObject &type, quint3
if (type == SceneObject::Piece)
{
m_beep->play();
if (checkPiece(id))
if (isPieceValid(id))
{
pieceId = id;
emit ToolTip(tr("Select the first point"));
Expand Down
4 changes: 1 addition & 3 deletions src/libs/vtools/dialogs/tools/union_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ class UnionDialog : public DialogTool
int getPiece1Index() const;
int getPiece2Index() const;

bool retainPieces() const;

public slots:
virtual void ChosenObject(quint32 id, const SceneObject &type) Q_DECL_OVERRIDE;

Expand All @@ -105,7 +103,7 @@ public slots:
QSound *m_beep;

bool CheckObject(const quint32 &id, const quint32 &pieceId) const;
bool checkPiece(const quint32 &pieceId) const;
bool isPieceValid(const quint32 &pieceId) const;

void chosenPiece(const quint32 &id, const SceneObject &type, quint32 &pieceId,
int &index);
Expand Down
8 changes: 2 additions & 6 deletions src/libs/vtools/dialogs/tools/union_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Do you really want to unite details?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Retain original pieces</string>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
Expand Down
Loading
Loading