mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
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:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user