Warn users about empty piece list when they use one of the tools those require
a piece to continue work. --HG-- branch : release
This commit is contained in:
parent
e9afe63c7b
commit
37428a4d82
|
@ -59,6 +59,12 @@ DialogInsertNode::~DialogInsertNode()
|
||||||
void DialogInsertNode::SetPiecesList(const QVector<quint32> &list)
|
void DialogInsertNode::SetPiecesList(const QVector<quint32> &list)
|
||||||
{
|
{
|
||||||
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
||||||
|
|
||||||
|
if (list.isEmpty())
|
||||||
|
{
|
||||||
|
qWarning() << tr("The list of pieces is empty. Please, first create at least one piece for current pattern "
|
||||||
|
"piece.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -1329,6 +1329,12 @@ QString DialogPiecePath::GetFormulaSAWidth() const
|
||||||
void DialogPiecePath::SetPiecesList(const QVector<quint32> &list)
|
void DialogPiecePath::SetPiecesList(const QVector<quint32> &list)
|
||||||
{
|
{
|
||||||
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
||||||
|
|
||||||
|
if (list.isEmpty())
|
||||||
|
{
|
||||||
|
qWarning() << tr("The list of pieces is empty. Please, first create at least one piece for current pattern "
|
||||||
|
"piece.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -116,6 +116,12 @@ void DialogPin::SetPointId(quint32 id)
|
||||||
void DialogPin::SetPiecesList(const QVector<quint32> &list)
|
void DialogPin::SetPiecesList(const QVector<quint32> &list)
|
||||||
{
|
{
|
||||||
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
||||||
|
|
||||||
|
if (list.isEmpty())
|
||||||
|
{
|
||||||
|
qWarning() << tr("The list of pieces is empty. Please, first create at least one piece for current pattern "
|
||||||
|
"piece.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -234,6 +234,12 @@ void DialogPlaceLabel::SetPieceId(quint32 id)
|
||||||
void DialogPlaceLabel::SetPiecesList(const QVector<quint32> &list)
|
void DialogPlaceLabel::SetPiecesList(const QVector<quint32> &list)
|
||||||
{
|
{
|
||||||
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
FillComboBoxPiecesList(ui->comboBoxPiece, list);
|
||||||
|
|
||||||
|
if (list.isEmpty())
|
||||||
|
{
|
||||||
|
qWarning() << tr("The list of pieces is empty. Please, first create at least one piece for current pattern "
|
||||||
|
"piece.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user