mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Started using QGraphicsView in canvases instead of QGLWidget.
This commit is contained in:
+24
-24
@@ -40,29 +40,29 @@ MShape* SourceGLCanvas::getShapeFromMappingId(uid mappingId)
|
||||
return mapping->getInputShape().get();
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
|
||||
void SourceGLCanvas::doDraw(QPainter* painter)
|
||||
{
|
||||
if (getMainWindow()->hasCurrentMapping())
|
||||
{
|
||||
uint mappingId = getMainWindow()->getCurrentMappingId();
|
||||
const Mapper::ptr& mapper = getMainWindow()->getMapperByMappingId(mappingId);
|
||||
painter->save();
|
||||
mapper->drawInput(painter);
|
||||
painter->restore();
|
||||
if (displayControls())
|
||||
{
|
||||
painter->save();
|
||||
if (hasActiveVertex()) {
|
||||
QList<int> selectedVertices;
|
||||
selectedVertices.append(getActiveVertexIndex());
|
||||
mapper->drawInputControls(painter, &selectedVertices);
|
||||
}
|
||||
else
|
||||
mapper->drawInputControls(painter);
|
||||
painter->restore();
|
||||
}
|
||||
}
|
||||
}
|
||||
//void SourceGLCanvas::doDraw(QPainter* painter)
|
||||
//{
|
||||
// if (getMainWindow()->hasCurrentMapping())
|
||||
// {
|
||||
// uint mappingId = getMainWindow()->getCurrentMappingId();
|
||||
// const Mapper::ptr& mapper = getMainWindow()->getMapperByMappingId(mappingId);
|
||||
// painter->save();
|
||||
// mapper->drawInput(painter);
|
||||
// painter->restore();
|
||||
// if (displayControls())
|
||||
// {
|
||||
// painter->save();
|
||||
// if (hasActiveVertex()) {
|
||||
// QList<int> selectedVertices;
|
||||
// selectedVertices.append(getActiveVertexIndex());
|
||||
// mapper->drawInputControls(painter, &selectedVertices);
|
||||
// }
|
||||
// else
|
||||
// mapper->drawInputControls(painter);
|
||||
// painter->restore();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user