Refactoring.
--HG-- branch : develop
This commit is contained in:
parent
48ad6cb678
commit
9041ebc2cf
|
@ -168,32 +168,17 @@ void DialogDetail::NewItem(quint32 id, const Tool &typeTool, const NodeDetail &t
|
||||||
switch (typeTool)
|
switch (typeTool)
|
||||||
{
|
{
|
||||||
case (Tool::NodePoint):
|
case (Tool::NodePoint):
|
||||||
{
|
|
||||||
const QSharedPointer<VPointF> point = data->GeometricObject<VPointF>(id);
|
|
||||||
name = point->name();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (Tool::NodeArc):
|
case (Tool::NodeArc):
|
||||||
{
|
|
||||||
const QSharedPointer<VArc> arc = data->GeometricObject<VArc>(id);
|
|
||||||
name = arc->name();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (Tool::NodeSpline):
|
case (Tool::NodeSpline):
|
||||||
{
|
|
||||||
const QSharedPointer<VSpline> spl = data->GeometricObject<VSpline>(id);
|
|
||||||
name = spl->name();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case (Tool::NodeSplinePath):
|
case (Tool::NodeSplinePath):
|
||||||
{
|
{
|
||||||
const QSharedPointer<VSplinePath> splPath = data->GeometricObject<VSplinePath>(id);
|
const QSharedPointer<VGObject> obj = data->GeometricObject<VGObject>(id);
|
||||||
name = splPath->name();
|
name = obj->name();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
qDebug()<<"Got wrong tools. Ignore.";
|
qDebug()<<"Got wrong tools. Ignore.";
|
||||||
break;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(name);
|
QListWidgetItem *item = new QListWidgetItem(name);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user