mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Display lock/mute/solo options in the context menu
This commit is contained in:
+12
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user