Fix regular and heightmap scale interval which would not enable

This commit is contained in:
Rogier 2015-07-02 18:04:54 +02:00
parent ff327ded1e
commit 8a2fd652a0
3 changed files with 97 additions and 0 deletions

View File

@ -42,6 +42,7 @@ InitStatics::InitStatics(void)
}
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
@ -926,3 +927,29 @@ void MainWindow::on_actionEdit_heightmap_colors_txt_triggered()
{
QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(ui->path_HeightmapColors->text()).absoluteFilePath()));
}
void MainWindow::on_drawScaleLeft_toggled(bool checked)
{
bool state = checked || ui->drawScaleTop->isChecked();
ui->sidescaleInterval->setEnabled(state);
state = state && ui->sidescaleInterval->isChecked();
ui->sidescaleIntervalMajor->setEnabled(state);
ui->sidescaleIntervalMinor->setEnabled(state);
}
void MainWindow::on_drawScaleTop_toggled(bool checked)
{
bool state = checked || ui->drawScaleLeft->isChecked();
ui->sidescaleInterval->setEnabled(state);
state = state && ui->sidescaleInterval->isChecked();
ui->sidescaleIntervalMajor->setEnabled(state);
ui->sidescaleIntervalMinor->setEnabled(state);
}
void MainWindow::on_drawHeightscale_toggled(bool checked)
{
ui->heightscaleInterval->setEnabled(checked);
bool state = checked && ui->heightscaleInterval->isChecked();
ui->heightscaleIntervalMajor->setEnabled(state);
ui->heightscaleIntervalMinor->setEnabled(state);
}

View File

@ -83,6 +83,12 @@ private slots:
void on_actionEdit_heightmap_colors_txt_triggered();
void on_drawScaleLeft_toggled(bool checked);
void on_drawScaleTop_toggled(bool checked);
void on_drawHeightscale_toggled(bool checked);
private:
Ui::MainWindow *ui;
QProgressBar *progressBar;

View File

@ -2947,6 +2947,70 @@ p, li { white-space: pre-wrap; }
</hint>
</hints>
</connection>
<connection>
<sender>heightscaleInterval</sender>
<signal>toggled(bool)</signal>
<receiver>heightscaleIntervalMajor</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>124</x>
<y>368</y>
</hint>
<hint type="destinationlabel">
<x>284</x>
<y>369</y>
</hint>
</hints>
</connection>
<connection>
<sender>heightscaleInterval</sender>
<signal>toggled(bool)</signal>
<receiver>heightscaleIntervalMinor</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>124</x>
<y>368</y>
</hint>
<hint type="destinationlabel">
<x>434</x>
<y>369</y>
</hint>
</hints>
</connection>
<connection>
<sender>sidescaleInterval</sender>
<signal>toggled(bool)</signal>
<receiver>sidescaleIntervalMajor</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>95</x>
<y>138</y>
</hint>
<hint type="destinationlabel">
<x>359</x>
<y>142</y>
</hint>
</hints>
</connection>
<connection>
<sender>sidescaleInterval</sender>
<signal>toggled(bool)</signal>
<receiver>sidescaleIntervalMinor</receiver>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>95</x>
<y>138</y>
</hint>
<hint type="destinationlabel">
<x>359</x>
<y>171</y>
</hint>
</hints>
</connection>
</connections>
<buttongroups>
<buttongroup name="geometrymode_size_group"/>