Skip to content

Commit

Permalink
修复加载预设时点取消会提示错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Elivicti committed Jul 28, 2022
1 parent c96a3d6 commit b5626bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PngPortrait2DDS/PngPortrait2DDS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ PngPortrait2DDS::PngPortrait2DDS(QWidget *parent)
connect(ui->actionSavePreset, &QAction::triggered, this, &PngPortrait2DDS::savePresetAsJson);
connect(ui->actionLoadPreset, &QAction::triggered, [this]() {
QString filename(QFileDialog::getOpenFileName(this, tr("Select Preset"), "./", tr("Json File(*.json)")));
this->loadPresetFromJson(filename);
if (!filename.isEmpty())
this->loadPresetFromJson(filename);
});

this->setAcceptDrops(true);
Expand Down

0 comments on commit b5626bb

Please sign in to comment.