Can not add one point to detail twice
--HG-- branch : feature
This commit is contained in:
parent
779117a34f
commit
4c41e04d49
|
@ -180,6 +180,23 @@ void DialogDetail::NewItem(quint32 id, const Tool &typeTool, const NodeDetail &t
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool canAddNewPoint = false;
|
||||||
|
|
||||||
|
if(ui.listWidget->count() == 0)
|
||||||
|
{
|
||||||
|
canAddNewPoint = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QString lastItemName = ui.listWidget->item(ui.listWidget->count()-1)->text();
|
||||||
|
if(QString::compare(lastItemName, name) != 0)
|
||||||
|
{
|
||||||
|
canAddNewPoint = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(canAddNewPoint)
|
||||||
|
{
|
||||||
QListWidgetItem *item = new QListWidgetItem(name);
|
QListWidgetItem *item = new QListWidgetItem(name);
|
||||||
item->setFont(QFont("Times", 12, QFont::Bold));
|
item->setFont(QFont("Times", 12, QFont::Bold));
|
||||||
VNodeDetail node(id, typeTool, typeNode, mx, my, reverse);
|
VNodeDetail node(id, typeTool, typeNode, mx, my, reverse);
|
||||||
|
@ -206,6 +223,7 @@ void DialogDetail::NewItem(quint32 id, const Tool &typeTool, const NodeDetail &t
|
||||||
ui.doubleSpinBoxBiasX->blockSignals(false);
|
ui.doubleSpinBoxBiasX->blockSignals(false);
|
||||||
ui.doubleSpinBoxBiasY->blockSignals(false);
|
ui.doubleSpinBoxBiasY->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
VDetail DialogDetail::CreateDetail() const
|
VDetail DialogDetail::CreateDetail() const
|
||||||
|
|
Loading…
Reference in New Issue
Block a user