aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-31 14:54:36 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-31 14:57:57 -0700
commite74914fdd0f439d3584657147c81539d2a863955 (patch)
treef25f24ffef40210e085733c90632331cf577404b /qt-ui/profile/profilewidget2.cpp
parentb9946b89fa3663318ac947778dbf701b1e4ebde0 (diff)
downloadsubsurface-e74914fdd0f439d3584657147c81539d2a863955.tar.gz
Planner: wild guess attempt to fix a crash on Mac
Staring at the stack trace it seems that it gets into an infinite recursion when trying to recalculate after being alerted to a change on the ruler. I cannot recreate this here (not on Linux, not on Mac), but here's a random attempt to prevent the issue: simply refuse to recalculate the ruler while in Add or Plan mode. Crude, but might show us if this really is the issue. Otherwise it's easy enough to revert this change. The qDebug() in there should tell us if people on a Mac do indeed see this even without moving the ruler around in Add or Plan mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index a196b346a..73df4f99d 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -830,6 +830,11 @@ bool ProfileWidget2::isPlanner()
return currentState == PLAN;
}
+bool ProfileWidget2::isAddOrPlanner()
+{
+ return currentState == PLAN || currentState == ADD;
+}
+
void ProfileWidget2::contextMenuEvent(QContextMenuEvent *event)
{
if (currentState == ADD || currentState == PLAN) {