File failed to load: https://isis.astrogeology.usgs.gov/3.9.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Programmer Reference
MatrixGraphicsScene.cpp
1 #include "MatrixGraphicsScene.h"
2 
3 #include <QGraphicsSceneMouseEvent>
4 
5 #include "MatrixSceneWidget.h"
6 
7 namespace Isis {
8  MatrixGraphicsScene::MatrixGraphicsScene(MatrixSceneWidget *parent) : QGraphicsScene(parent) {
9  }
10 
11  MatrixGraphicsScene::~MatrixGraphicsScene() {
12  }
13 
14 
15  void MatrixGraphicsScene::contextMenuEvent(QGraphicsSceneContextMenuEvent *contextMenuEvent) {
16  if ( selectedItems().count() < 2 ||
17  !qobject_cast<MatrixSceneWidget *>( parent() )->contextMenuEvent(contextMenuEvent) ) {
18  QGraphicsScene::contextMenuEvent(contextMenuEvent);
19  }
20  }
21 
22 
23  void MatrixGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *mouseEvent) {
24  if (mouseEvent->button() == Qt::RightButton) {
25  // Do nothing on right click... this prevents the loss of selection before a context event
26  mouseEvent->accept();
27  }
28  else {
29  QGraphicsScene::mousePressEvent(mouseEvent);
30  emit selectionChanged();
31  }
32  }
33 }
34 
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/12/2023 23:24:34