Display lock/mute/solo options in the context menu

This commit is contained in:
baydam
2016-02-11 21:24:08 +00:00
parent 1309305614
commit 21c91295d1
10 changed files with 122 additions and 19 deletions
+12 -2
View File
@@ -236,7 +236,8 @@ void MapperGLCanvas::mousePressEvent(QMouseEvent* event)
_activeVertex = i;
minDistance = dist;
_vertexGrabbed = true;
// Vertex can be grabbed only if the mapping is not locked
_vertexGrabbed = shape->isLocked() ? false : true;
mousePressedOnSomething = true;
_grabbedObjectStartScenePosition = shape->getVertex(i);
@@ -287,12 +288,21 @@ void MapperGLCanvas::mousePressEvent(QMouseEvent* event)
{
if (selectedShape && selectedShape->includesPoint(pos))
{
_shapeGrabbed = true;
// Shape can be grabbed only if it is not locked
_shapeGrabbed = selectedShape->isLocked() ? false : true;
_shapeFirstGrab = true;
_grabbedObjectStartScenePosition = pos;
}
}
// Show the shape/mapping context menu
if (event->button() & Qt::RightButton)
{
if (selectedShape && selectedShape->includesPoint(pos))
{
emit shapeContextMenuRequested(event->pos());
}
}
}
if (mousePressedOnSomething)