Skip to content

Commit

Permalink
zoomx/y per rubberband
Browse files Browse the repository at this point in the history
  • Loading branch information
sunderme committed Dec 3, 2022
1 parent 17e8713 commit 6d78e51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/zoomablechartview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,8 @@ void ZoomableChartView::mouseReleaseEvent(QMouseEvent *event)
chart()->zoomIn(rect.normalized());
updateMarker();
}
if(!rubberBandRect().isNull() && m_zoomMode==HorizontalZoom){
qDebug()<<rubberBandRect();
if(m_zoomMode==HorizontalZoom){
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
m_lastMousePos = event->position();
#else
Expand All @@ -831,7 +832,7 @@ void ZoomableChartView::mouseReleaseEvent(QMouseEvent *event)
chart()->zoomIn(rect.normalized());
updateMarker();
}
if(!rubberBandRect().isNull() && m_zoomMode==VerticalZoom){
if(m_zoomMode==VerticalZoom){
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
m_lastMousePos = event->position();
#else
Expand Down

0 comments on commit 6d78e51

Please sign in to comment.