diff --git a/sleepyhead/Graphs/gGraph.cpp b/sleepyhead/Graphs/gGraph.cpp index 00ade1b0..0198ea62 100644 --- a/sleepyhead/Graphs/gGraph.cpp +++ b/sleepyhead/Graphs/gGraph.cpp @@ -1061,7 +1061,7 @@ void gGraph::keyReleaseEvent(QKeyEvent *event) if (!m_graphview) return; if (m_graphview->selectionInProgress() && m_graphview->metaSelect()) { - if (!(event->modifiers() & Qt::ControlModifier)) { + if (!(event->modifiers() & Qt::ShiftModifier)) { } } diff --git a/sleepyhead/Graphs/gGraphView.cpp b/sleepyhead/Graphs/gGraphView.cpp index de7dd5fa..a73770e9 100644 --- a/sleepyhead/Graphs/gGraphView.cpp +++ b/sleepyhead/Graphs/gGraphView.cpp @@ -1384,11 +1384,19 @@ void gGraphView::mousePressEvent(QMouseEvent *event) } { + if (m_metaselect) { + if (m_selected_graph) { + m_selected_graph->m_selecting_area = false; + } + } // send event to graph.. m_point_clicked = QPoint(event->x(), event->y()); + //QMouseEvent e(event->type(),m_point_clicked,event->button(),event->buttons(),event->modifiers()); + + m_button_down = true; - m_metaselect = event->modifiers() && Qt::ControlModifier; + m_metaselect = event->modifiers() && Qt::ShiftModifier; m_horiz_travel = 0; m_graph_index = i; m_selected_graph = m_graphs[i]; @@ -1441,11 +1449,16 @@ void gGraphView::mousePressEvent(QMouseEvent *event) } { + if (m_metaselect) { + if (m_selected_graph) { + m_selected_graph->m_selecting_area = false; + } + } // send event to graph.. m_point_clicked = QPoint(event->x(), event->y()); //QMouseEvent e(event->type(),m_point_clicked,event->button(),event->buttons(),event->modifiers()); m_button_down = true; - m_metaselect = event->modifiers() && Qt::ControlModifier; + m_metaselect = event->modifiers() && Qt::ShiftModifier; m_horiz_travel = 0; m_graph_index = i; @@ -1559,7 +1572,7 @@ void gGraphView::mouseReleaseEvent(QMouseEvent *event) // The graph that got the button press gets the release event if (m_button_down) { m_button_down = false; - m_metaselect = event->modifiers() & Qt::ControlModifier; + m_metaselect = event->modifiers() & Qt::ShiftModifier; if (m_metaselect) { m_point_released = event->pos(); @@ -1571,7 +1584,7 @@ void gGraphView::mouseReleaseEvent(QMouseEvent *event) void gGraphView::keyReleaseEvent(QKeyEvent *event) { - if (m_metaselect && !(event->modifiers() & Qt::ControlModifier)) { + if (m_metaselect && !(event->modifiers() & Qt::ShiftModifier)) { QMouseEvent mevent(QEvent::MouseButtonRelease, m_point_released, Qt::LeftButton, Qt::LeftButton, event->modifiers()); if (m_graph_index>=0) m_graphs[m_graph_index]->mouseReleaseEvent(&mevent); @@ -1791,8 +1804,9 @@ void gGraphView::wheelEvent(QWheelEvent *event) void gGraphView::keyPressEvent(QKeyEvent *event) { if (m_button_down) { - m_metaselect = event->modifiers() & Qt::ControlModifier; + m_metaselect = event->modifiers() & Qt::ShiftModifier; } + if (event->key() == Qt::Key_Tab) { event->ignore(); return;