Skip to content

Commit

Permalink
stopped gui output path tool from setting the output path to a blank …
Browse files Browse the repository at this point in the history
…string when users click cancel, now clicking cancel always sets the output path to the starting path instead. For issue #540.

also fixed a bug where the start path for the gui output path tool was always one directory up from the starting path.

note that the start path for the gui output path when WindNinja is first started up, is always an empty string, but solve cannot be selected until the user specifies a dem. Each time the user selects a new dem, the output path always gets set to be the path of the new dem. Related to issue #369
  • Loading branch information
latwood committed Dec 6, 2024
1 parent 76880af commit bc78344
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/gui/solvePage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,12 @@ void solvePage::setOutputDir(QString dir) {
}

void solvePage::chooseOutputDir() {
QString start = QFileInfo( outputDirLineEdit->text() ).absolutePath();
QString dir = QFileDialog::getExistingDirectory( this,
tr("Open Output Directory"), start, QFileDialog::ShowDirsOnly );
tr("Open Output Directory"), outputDirLineEdit->text(), QFileDialog::ShowDirsOnly );
if( dir == "" )
{
dir = outputDirLineEdit->text();
}
outputDirLineEdit->setText( dir );
}

Expand Down

0 comments on commit bc78344

Please sign in to comment.