MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / addShape

Method addShape

static_libs/common/project.cpp:370–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370int Project::addShape(ShapeInterface* const shape)
371{
372 QMutexLocker locker(&m_mutex);
373 if (!shape)
374 return -1;
375 m_isPinsPlaced = false;
376 const int newId = m_shapes.size()
377 ? (--m_shapes.end())->first + 1
378 : 0;
379 shape->m_giId = newId;
380 shape->setToolTip(QString::number(newId));
381 shape->setZValue(newId);
382 m_shapes.emplace(newId, shape);
383 App::fileModel()->addShape(shape);
384 setChanged();
385 return newId;
386}
387
388bool Project::contains(FileInterface* file)
389{

Callers 2

addShapePoint_Method · 0.45
openMethod · 0.45

Calls 3

sizeMethod · 0.80
endMethod · 0.80
setZValueMethod · 0.80

Tested by

no test coverage detected