Skip to content

Commit dd1d2d6

Browse files
committed
better change detection for tsliders in matrixview
1 parent f6ca9f8 commit dd1d2d6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/classmodel.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,10 +1230,9 @@ classmodel_update(Classmodel *classmodel)
12301230
void
12311231
classmodel_update_view(Classmodel *classmodel)
12321232
{
1233-
Row *row = HEAPMODEL(classmodel)->row;
1234-
12351233
classmodel_update(classmodel);
12361234

1235+
Row *row = HEAPMODEL(classmodel)->row;
12371236
if (row &&
12381237
row->expr)
12391238
workspace_set_modified(row->ws, TRUE);

src/matrixview.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ matrixview_slider_changed(Tslider *tslider, Matrixview *matrixview)
100100

101101
g_assert(pos >= 0);
102102

103-
/* Install value.
103+
/* Install value. Ignore changes due to rounding.
104104
*/
105-
if (matrix->value.coeff[i] != tslider->svalue) {
105+
if (fabs(matrix->value.coeff[i] - tslider->svalue) > 0.0001) {
106106
matrix->value.coeff[i] = tslider->svalue;
107107

108108
classmodel_update_view(CLASSMODEL(matrix));

0 commit comments

Comments
 (0)