Fix dimension calculation in heatmap plugin (fix #8193)

This commit is contained in:
Nyall Dawson 2013-06-30 22:13:00 +10:00
parent 1ad59b798e
commit 4240807cbe

View File

@ -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();
}