diff options
Diffstat (limited to 'academic/scidavis/fix-sf385-crash-using-data-range-selector.patch')
-rw-r--r-- | academic/scidavis/fix-sf385-crash-using-data-range-selector.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/academic/scidavis/fix-sf385-crash-using-data-range-selector.patch b/academic/scidavis/fix-sf385-crash-using-data-range-selector.patch new file mode 100644 index 0000000000000..ba062d2e2866c --- /dev/null +++ b/academic/scidavis/fix-sf385-crash-using-data-range-selector.patch @@ -0,0 +1,29 @@ +diff --git a/libscidavis/src/RangeSelectorTool.cpp b/libscidavis/src/RangeSelectorTool.cpp +index 26ce5fd..65bfa54 100644 +--- a/libscidavis/src/RangeSelectorTool.cpp ++++ b/libscidavis/src/RangeSelectorTool.cpp +@@ -115,8 +115,8 @@ void RangeSelectorTool::pointSelected(const QPoint &pos) + setActivePoint(point); + else { + // try to be intelligent about selecting the inactive point +- double min_x = curve->minXValue(); +- double max_x = curve->maxXValue(); ++ double min_x = minXValue(); ++ double max_x = maxXValue(); + int n = curve->dataSize(); + double second_x; + if (curve->x(point) == min_x) +@@ -129,11 +129,11 @@ void RangeSelectorTool::pointSelected(const QPoint &pos) + second_x = min_x; + if (second_x == max_x) { // start at selected point and try larger indices first + for (int i=0; i<n; ++i) +- if (curve->x((i + point) % n) == max_x) ++ if (qFuzzyCompare(curve->x((i + point) % n), max_x)) + d_inactive_point = (i + point) % n; + } else { // start at selected point and try smaller indices first + for (int i=n-1; i>=0; --i) +- if (curve->x((i + point) % n) == max_x) ++ if (qFuzzyCompare(curve->x((i + point) % n),max_x)) + d_inactive_point = (i + point) % n; + } + d_selected_curve = curve; |