Element editor : add two new actions in context menu for insert or remove point of a selected polygon.

All parts items : remove the 'open hand cursor' when hover a selected part.


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5419 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2018-06-30 21:41:27 +00:00
parent 114c3cdcc3
commit 28faaf12c5
9 changed files with 176 additions and 38 deletions

View File

@@ -240,6 +240,10 @@ void ElementScene::keyPressEvent(QKeyEvent *event)
*/
void ElementScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
{
QGraphicsScene::contextMenuEvent(event);
if(event->isAccepted())
return;
if (m_behavior == ElementScene::Normal)
m_element_editor -> contextMenu(event->screenPos());
}
@@ -302,11 +306,14 @@ void ElementScene::clearEventInterface()
* Modifie the current behavior of this scene
* @param b
*/
void ElementScene::setBehavior(ElementScene::Behavior b)
{
void ElementScene::setBehavior(ElementScene::Behavior b) {
m_behavior = b;
}
ElementScene::Behavior ElementScene::behavior() const {
return m_behavior;
}
/**
@return la taille horizontale de la grille
*/