From f631d72abebce57899f302dc226fe394bdfcf4e2 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Thu, 27 Feb 2014 17:07:50 +0000 Subject: [PATCH] Fix RideEditor SEGV on rideselected (!) .. When interval tree is rebuilt it can cause an issue in the ride editor when clearing the selection model. .. still trying to get to the botton of a SEGV on Mac. --- src/Tab.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Tab.cpp b/src/Tab.cpp index 3d3ef5a93..1900da480 100644 --- a/src/Tab.cpp +++ b/src/Tab.cpp @@ -21,6 +21,7 @@ #include "Views.h" #include "Athlete.h" #include "IntervalItem.h" +#include "IntervalTreeView.h" #include "MainWindow.h" Tab::Tab(Context *context) : QWidget(context->mainWindow), context(context) @@ -181,6 +182,10 @@ Tab::rideSelected(RideItem*) if (!context->ride) return; + // stop SEGV in widgets watching for intervals being + // selected whilst we are deleting them from the tree + context->athlete->intervalWidget->blockSignals(true); + // refresh interval list for bottom left // first lets wipe away the existing intervals QList intervals = context->athlete->allIntervals->takeChildren(); @@ -206,5 +211,7 @@ Tab::rideSelected(RideItem*) } } } + // all done, so connected widgets can receive signals now + context->athlete->intervalWidget->blockSignals(false); }