Skip to content

Commit

Permalink
Follow up to 4240807
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 1, 2013
1 parent 4240807 commit cfebe8f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/plugins/heatmap/heatmapgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void HeatmapGui::on_advancedGroupBox_toggled( bool enabled )
}
}

void HeatmapGui::on_rowsSpinBox_editingFinished()
void HeatmapGui::on_rowsSpinBox_valueChanged()
{
mRows = rowsSpinBox->value();
mYcellsize = mBBox.height() / mRows;
Expand All @@ -290,7 +290,7 @@ void HeatmapGui::on_rowsSpinBox_editingFinished()
updateSize();
}

void HeatmapGui::on_columnsSpinBox_editingFinished()
void HeatmapGui::on_columnsSpinBox_valueChanged()
{
mColumns = columnsSpinBox->value();
mXcellsize = mBBox.width() / mColumns;
Expand All @@ -304,8 +304,8 @@ void HeatmapGui::on_cellXLineEdit_editingFinished()
{
mXcellsize = cellXLineEdit->text().toDouble();
mYcellsize = mXcellsize;
mRows = max( mBBox.height() / mYcellsize, 1 );
mColumns = max( mBBox.width() / mXcellsize, 1 );
mRows = max( round( mBBox.height() / mYcellsize ), 1 );
mColumns = max( round( mBBox.width() / mXcellsize ), 1 );

updateSize();
}
Expand All @@ -314,8 +314,8 @@ void HeatmapGui::on_cellYLineEdit_editingFinished()
{
mYcellsize = cellYLineEdit->text().toDouble();
mXcellsize = mYcellsize;
mRows = max( mBBox.height() / mYcellsize, 1 );
mColumns = max( mBBox.width() / mXcellsize, 1 );
mRows = max( round( mBBox.height() / mYcellsize ), 1 );
mColumns = max( round( mBBox.width() / mXcellsize ), 1 );

updateSize();
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/heatmap/heatmapgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ class HeatmapGui : public QDialog, private Ui::HeatmapGuiBase
void on_browseButton_clicked();
void on_outputRasterLineEdit_editingFinished();
void on_advancedGroupBox_toggled( bool enabled );
void on_rowsSpinBox_editingFinished();
void on_columnsSpinBox_editingFinished();
void on_rowsSpinBox_valueChanged();
void on_columnsSpinBox_valueChanged();
void on_cellXLineEdit_editingFinished();
void on_cellYLineEdit_editingFinished();
void on_radiusFieldCombo_currentIndexChanged( int index );
Expand Down
6 changes: 6 additions & 0 deletions src/plugins/heatmap/heatmapguibase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="rowsSpinBox">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand All @@ -176,6 +179,9 @@
</item>
<item row="0" column="3">
<widget class="QSpinBox" name="columnsSpinBox">
<property name="keyboardTracking">
<bool>false</bool>
</property>
<property name="minimum">
<number>1</number>
</property>
Expand Down

0 comments on commit cfebe8f

Please sign in to comment.