Skip to content

Commit

Permalink
fixed a bug in color channel preview, added autoupdate for KLD settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Theverat committed Oct 25, 2014
1 parent a00c5b9 commit 3f518ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion intensitymap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ QImage IntensityMap::convertToQImage() {
for(int y = 0; y < this->getHeight(); y++) {
for(int x = 0; x < this->getWidth(); x++) {
int c = 255 * map.at(y).at(x);
result.setPixel(x, y, QColor(c, c, c, c).rgba());
result.setPixel(x, y, QColor(c, c, c, 255).rgba());
}
}

Expand Down
5 changes: 5 additions & 0 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ bool MainWindow::load(QUrl url) {
ui->checkBox_displayChannelIntensity->setEnabled(true);
ui->spinBox_normalmapSize->setEnabled(true);
enableAutoupdate(true);
//TODO: algorithm to find best settings for KeepLargeDetail

//switch active tab to input
ui->tabWidget->setCurrentIndex(0);

Expand Down Expand Up @@ -695,6 +697,9 @@ void MainWindow::connectSignalSlots() {
connect(ui->checkBox_tileable, SIGNAL(clicked()), this, SLOT(autoUpdate()));
connect(ui->checkBox_invertHeight, SIGNAL(clicked()), this, SLOT(autoUpdate()));
connect(ui->spinBox_normalmapSize, SIGNAL(valueChanged(int)), this, SLOT(autoUpdate()));
connect(ui->checkBox_keepLargeDetail, SIGNAL(clicked()), this, SLOT(autoUpdate()));
connect(ui->spinBox_largeDetailScale, SIGNAL(valueChanged(int)), this, SLOT(autoUpdate()));
connect(ui->doubleSpinBox_largeDetailHeight, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
// displcacement autoupdate
connect(ui->doubleSpinBox_displace_redMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
connect(ui->doubleSpinBox_displace_greenMul, SIGNAL(valueChanged(double)), this, SLOT(autoUpdate()));
Expand Down

0 comments on commit 3f518ac

Please sign in to comment.