diff --git a/src/plugins/heatmap/heatmapgui.cpp b/src/plugins/heatmap/heatmapgui.cpp index 41bbb822afc..b2893de9eec 100644 --- a/src/plugins/heatmap/heatmapgui.cpp +++ b/src/plugins/heatmap/heatmapgui.cpp @@ -285,7 +285,7 @@ void HeatmapGui::on_rowsSpinBox_editingFinished() mRows = rowsSpinBox->value(); mYcellsize = mBBox.height() / mRows; mXcellsize = mYcellsize; - mColumns = max( mBBox.width() / mXcellsize, 1 ); + mColumns = max( round( mBBox.width() / mXcellsize ), 1 ); updateSize(); } @@ -295,7 +295,7 @@ void HeatmapGui::on_columnsSpinBox_editingFinished() mColumns = columnsSpinBox->value(); mXcellsize = mBBox.width() / mColumns; mYcellsize = mXcellsize; - mRows = max( mBBox.height() / mYcellsize, 1 ); + mRows = max( round( mBBox.height() / mYcellsize ), 1 ); updateSize(); }