Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions qtfred/src/ui/dialogs/BackgroundEditorDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,22 +221,22 @@ void BackgroundEditorDialog::refreshSunList()

const auto names = _model->getMissionSunNames();

const int oldRow = ui->sunsListWidget->currentRow();
ui->sunsListWidget->setUpdatesEnabled(false);
ui->sunsListWidget->clear();
const int oldRow = ui->sunListWidget->currentRow();
ui->sunListWidget->setUpdatesEnabled(false);
ui->sunListWidget->clear();

QStringList items;
items.reserve(static_cast<int>(names.size()));
for (const auto& s : names)
items << QString::fromStdString(s);
ui->sunsListWidget->addItems(items);
ui->sunListWidget->addItems(items);

if (!items.isEmpty()) {
const int clamped = qBound(0, oldRow, ui->sunsListWidget->count() - 1);
ui->sunsListWidget->setCurrentRow(clamped);
const int clamped = qBound(0, oldRow, ui->sunListWidget->count() - 1);
ui->sunListWidget->setCurrentRow(clamped);
}

ui->sunsListWidget->setUpdatesEnabled(true);
ui->sunListWidget->setUpdatesEnabled(true);

updateSunControls();
}
Expand Down Expand Up @@ -903,11 +903,6 @@ void BackgroundEditorDialog::on_skyboxHeadingSpin_valueChanged(double arg1)
_model->setSkyboxHeading(static_cast<float>(arg1));
}

void BackgroundEditorDialog::on_skyboxNoLightingCheckBox_toggled(bool checked)
{
_model->setSkyboxNoLighting(checked);
}

void BackgroundEditorDialog::on_noLightingCheckBox_toggled(bool checked)
{
_model->setSkyboxNoLighting(checked);
Expand Down
1 change: 0 additions & 1 deletion qtfred/src/ui/dialogs/BackgroundEditorDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ private slots:
void on_skyboxPitchSpin_valueChanged(double arg1);
void on_skyboxBankSpin_valueChanged(double arg1);
void on_skyboxHeadingSpin_valueChanged(double arg1);
void on_skyboxNoLightingCheckBox_toggled(bool checked);
void on_noLightingCheckBox_toggled(bool checked);
void on_transparentCheckBox_toggled(bool checked);
void on_forceClampCheckBox_toggled(bool checked);
Expand Down
12 changes: 6 additions & 6 deletions qtfred/src/ui/dialogs/CommandBriefingDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ _viewport(viewport)
this->setFocus();
ui->setupUi(this);

ui->speechFileName->setMaxLength(NAME_LENGTH - 1);
ui->animationFileName->setMaxLength(NAME_LENGTH - 1);
ui->speechFilename->setMaxLength(NAME_LENGTH - 1);
ui->animationFilename->setMaxLength(NAME_LENGTH - 1);
ui->actionHighResolutionFilenameEdit->setMaxLength(NAME_LENGTH - 1);
ui->actionLowResolutionFilenameEdit->setMaxLength(NAME_LENGTH - 1);

Expand Down Expand Up @@ -87,8 +87,8 @@ void CommandBriefingDialog::updateUi()
ui->actionChangeTeams->setCurrentIndex(ui->actionChangeTeams->findData(_model->getCurrentTeam()));

ui->actionBriefingTextEditor->setPlainText(_model->getBriefingText().c_str());
ui->animationFileName->setText(_model->getAnimationFilename().c_str());
ui->speechFileName->setText(_model->getSpeechFilename().c_str());
ui->animationFilename->setText(_model->getAnimationFilename().c_str());
ui->speechFilename->setText(_model->getSpeechFilename().c_str());
ui->actionLowResolutionFilenameEdit->setText(_model->getLowResolutionFilename().c_str());
ui->actionHighResolutionFilenameEdit->setText(_model->getHighResolutionFilename().c_str());

Expand Down Expand Up @@ -120,9 +120,9 @@ void CommandBriefingDialog::enableDisableControls()
ui->actionChangeTeams->setEnabled(_model->getMissionIsMultiTeam());
ui->actionCopyToOtherTeams->setEnabled(_model->getMissionIsMultiTeam());

ui->animationFileName->setEnabled(total_stages > 0);
ui->animationFilename->setEnabled(total_stages > 0);
ui->actionBrowseAnimation->setEnabled(total_stages > 0);
ui->speechFileName->setEnabled(total_stages > 0);
ui->speechFilename->setEnabled(total_stages > 0);
ui->actionBrowseSpeechFile->setEnabled(total_stages > 0);
ui->actionTestSpeechFileButton->setEnabled(total_stages > 0 && !_model->getSpeechFilename().empty());

Expand Down
16 changes: 0 additions & 16 deletions qtfred/src/ui/dialogs/MissionSpecDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,22 +401,6 @@ void MissionSpecDialog::on_supportRearmOptionsButton_clicked()
}
}

void MissionSpecDialog::on_toggleSupportShip_toggled(bool enabled) {
_model->setDisallowSupport(enabled);
}

void MissionSpecDialog::on_toggleHullRepair_toggled(bool enabled) {
_model->setMissionFlagDirect(Mission::Mission_Flags::Support_repairs_hull, enabled);
}

void MissionSpecDialog::on_hullRepairMax_valueChanged(double value) {
_model->setHullRepairMax((float)value);
}

void MissionSpecDialog::on_subsysRepairMax_valueChanged(double value) {
_model->setSubsysRepairMax((float)value);
}

void MissionSpecDialog::on_toggleTrail_toggled(bool enabled) {
_model->setMissionFlagDirect(Mission::Mission_Flags::Toggle_ship_trails, enabled);
}
Expand Down
4 changes: 0 additions & 4 deletions qtfred/src/ui/dialogs/MissionSpecDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ private slots:
void on_supportRearmOptionsButton_clicked();

// Middle column
void on_toggleSupportShip_toggled(bool checked);
void on_toggleHullRepair_toggled(bool checked);
void on_hullRepairMax_valueChanged(double value);
void on_subsysRepairMax_valueChanged(double value);
void on_toggleTrail_toggled(bool checked);
void on_toggleSpeedDisplay_toggled(bool checked);
void on_minDisplaySpeed_valueChanged(int value);
Expand Down
2 changes: 1 addition & 1 deletion qtfred/src/ui/dialogs/VoiceActingManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void VoiceActingManager::initializeUi()

// Filename settings
ui->includeSenderCheckBox->setChecked(_model->includeSenderInFilename());
ui->replaceCheckBox->setChecked(_model->noReplace());
ui->noReplaceCheckBox->setChecked(_model->noReplace());
ui->suffixComboBox->setCurrentIndex(suffixToIndex(_model->suffix()));

// Script export
Expand Down
2 changes: 1 addition & 1 deletion qtfred/ui/BackgroundEditor.ui
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<item>
<layout class="QVBoxLayout" name="sunLeftLayout">
<item>
<widget class="QListWidget" name="sunsListWidget"/>
<widget class="QListWidget" name="sunListWidget"/>
</item>
<item>
<layout class="QHBoxLayout" name="sunsButtonsLayout">
Expand Down
8 changes: 4 additions & 4 deletions qtfred/ui/CommandBriefingDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<item>
<layout class="QGridLayout" name="fileSelectionGridLayout">
<item row="2" column="2">
<widget class="QLineEdit" name="speechFileName">
<widget class="QLineEdit" name="speechFilename">
<property name="text">
<string/>
</property>
Expand Down Expand Up @@ -248,7 +248,7 @@
</widget>
</item>
<item row="1" column="2">
<widget class="QLineEdit" name="animationFileName">
<widget class="QLineEdit" name="animationFilename">
<property name="text">
<string/>
</property>
Expand Down Expand Up @@ -307,9 +307,9 @@
<tabstop>actionDeleteStage</tabstop>
<tabstop>actionCopyToOtherTeams</tabstop>
<tabstop>actionBriefingTextEditor</tabstop>
<tabstop>animationFileName</tabstop>
<tabstop>animationFilename</tabstop>
<tabstop>actionBrowseAnimation</tabstop>
<tabstop>speechFileName</tabstop>
<tabstop>speechFilename</tabstop>
<tabstop>actionBrowseSpeechFile</tabstop>
<tabstop>actionTestSpeechFileButton</tabstop>
<tabstop>actionLowResolutionFilenameEdit</tabstop>
Expand Down
2 changes: 1 addition & 1 deletion qtfred/ui/ObjectOrientationDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
<widget class="QGroupBox" name="transformSettingsGroupBox">
<layout class="QVBoxLayout" name="transformVerticalLayout">
<item>
<widget class="QRadioButton" name="transformIndependantlyRadioButton">
<widget class="QRadioButton" name="transformIndependentlyRadioButton">
<property name="text">
<string>Transform Objects Independently</string>
</property>
Expand Down
4 changes: 2 additions & 2 deletions qtfred/ui/VoiceActingManager.ui
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="replaceCheckBox">
<widget class="QCheckBox" name="noReplaceCheckBox">
<property name="text">
<string>Replace existing file names</string>
<string>Don't replace existing file names</string>
</property>
</widget>
</item>
Expand Down
Loading