Skip to content

Commit

Permalink
Engine properties are disabled if no engine is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
duganchen committed Aug 27, 2016
1 parent 62afc05 commit 881acba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions abstractmodels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,12 @@ void EngineListModel::setDoomExe()
QString title = tr("Find your original iD Engine executable (e.g. DOOM2.EXE)");
QString filter = tr("EXE Files (*.EXE);;All files (*)");
QString tempPath = QFileDialog::getOpenFileName(NULL, title, "", filter);

if (tempPath == NULL)
{
return;
}

QFileInfo doomfile(tempPath);

if (!doomfile.exists())
Expand Down
1 change: 1 addition & 0 deletions enginesetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ void RocketLauncher2::on_button_removeEng_clicked()

void RocketLauncher2::on_listbox_engines_clicked(const QModelIndex &index)
{
ui->groupBox_4->setEnabled(true);
ui->input_selEngName->setText(
enginelist->data(index,Qt::DisplayRole).toString()
);
Expand Down
3 changes: 3 additions & 0 deletions rocketlauncher2.ui
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,9 @@ External File</string>
</item>
<item row="0" column="2" alignment="Qt::AlignVCenter">
<widget class="QGroupBox" name="groupBox_4">
<property name="enabled">
<bool>false</bool>
</property>
<property name="title">
<string>Engine Properties</string>
</property>
Expand Down

0 comments on commit 881acba

Please sign in to comment.