mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: disable mouse interaction when zoomed in
When zoomed in, things like moving planner points is not possible, but if the user attempts that, replan() -> plotDive() is called and the zoomLevel should be reset to the default value (we don't really want that), but instead it's lost for some reason (as the user reports: "Somes times, it changes to 100% which is ok"). If moving points becomes possible eventually while zoomed in, we need to figure a way to replot without resetting the zoom level in plotDive(). Fixes #851 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2a1a868db2
commit
1e81dff946
1 changed files with 8 additions and 0 deletions
|
@ -733,6 +733,8 @@ void ProfileWidget2::resizeEvent(QResizeEvent *event)
|
|||
|
||||
void ProfileWidget2::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
if (zoomLevel)
|
||||
return;
|
||||
QGraphicsView::mousePressEvent(event);
|
||||
if (currentState == PLAN)
|
||||
shouldCalculateMaxTime = false;
|
||||
|
@ -740,18 +742,24 @@ void ProfileWidget2::mousePressEvent(QMouseEvent *event)
|
|||
|
||||
void ProfileWidget2::divePlannerHandlerClicked()
|
||||
{
|
||||
if (zoomLevel)
|
||||
return;
|
||||
shouldCalculateMaxDepth = false;
|
||||
replot();
|
||||
}
|
||||
|
||||
void ProfileWidget2::divePlannerHandlerReleased()
|
||||
{
|
||||
if (zoomLevel)
|
||||
return;
|
||||
shouldCalculateMaxDepth = true;
|
||||
replot();
|
||||
}
|
||||
|
||||
void ProfileWidget2::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if (zoomLevel)
|
||||
return;
|
||||
QGraphicsView::mouseReleaseEvent(event);
|
||||
if (currentState == PLAN) {
|
||||
shouldCalculateMaxTime = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue