##// END OF EJS Templates
Fix crash when changing the values to empty model with logarithmic axis...
Miikka Heikkinen -
r2427:b3d485323aa9
parent child
Show More
@@ -76,7 +76,8 Bug Fixes
76 - Fixed: Using setLineVisible(false) on a QBarCategoryAxis gives blurry text
76 - Fixed: Using setLineVisible(false) on a QBarCategoryAxis gives blurry text
77 - Fixed: Set the range to min and max for default axes from previously added series
77 - Fixed: Set the range to min and max for default axes from previously added series
78 - Fixed: Axes use incorrect bounding rectangle to calculate sizeHint when labels are in non-default angle
78 - Fixed: Axes use incorrect bounding rectangle to calculate sizeHint when labels are in non-default angle
79 - Fixes: Axis titles can slightly overlap with axis labels and axis lines
79 - Fixed: Axis titles can slightly overlap with axis labels and axis lines
80 - Fixed: Charts crashes when changing the values to empty model with logarithmic axis
80
81
81 Known Issues
82 Known Issues
82 ============
83 ============
@@ -84,16 +84,15 void XYChart::handlePointAdded(int index)
84
84
85 QVector<QPointF> points;
85 QVector<QPointF> points;
86
86
87 if (m_dirty) {
87 if (m_dirty || m_points.isEmpty()) {
88 points = domain()->calculateGeometryPoints(m_series->points());
88 points = domain()->calculateGeometryPoints(m_series->points());
89 } else {
89 } else {
90 points = m_points;
90 points = m_points;
91 QPointF point = domain()->calculateGeometryPoint(m_series->points()[index], m_validData);
91 QPointF point = domain()->calculateGeometryPoint(m_series->points()[index], m_validData);
92 if (!m_validData) {
92 if (!m_validData)
93 m_points.clear();
93 m_points.clear();
94 return;
94 else
95 }
95 points.insert(index, point);
96 points.insert(index, point);
97 }
96 }
98
97
99 updateChart(m_points, points, index);
98 updateChart(m_points, points, index);
@@ -106,7 +105,7 void XYChart::handlePointRemoved(int index)
106
105
107 QVector<QPointF> points;
106 QVector<QPointF> points;
108
107
109 if (m_dirty) {
108 if (m_dirty || m_points.isEmpty()) {
110 points = domain()->calculateGeometryPoints(m_series->points());
109 points = domain()->calculateGeometryPoints(m_series->points());
111 } else {
110 } else {
112 points = m_points;
111 points = m_points;
@@ -123,16 +122,15 void XYChart::handlePointReplaced(int index)
123
122
124 QVector<QPointF> points;
123 QVector<QPointF> points;
125
124
126 if (m_dirty) {
125 if (m_dirty || m_points.isEmpty()) {
127 points = domain()->calculateGeometryPoints(m_series->points());
126 points = domain()->calculateGeometryPoints(m_series->points());
128 } else {
127 } else {
129 QPointF point = domain()->calculateGeometryPoint(m_series->points()[index], m_validData);
128 QPointF point = domain()->calculateGeometryPoint(m_series->points()[index], m_validData);
130 if (!m_validData) {
129 if (!m_validData)
131 m_points.clear();
130 m_points.clear();
132 return;
133 }
134 points = m_points;
131 points = m_points;
135 points.replace(index, point);
132 if (m_validData)
133 points.replace(index, point);
136 }
134 }
137
135
138 updateChart(m_points, points, index);
136 updateChart(m_points, points, index);
General Comments 0
You need to be logged in to leave comments. Login now