Fixed trigger function
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
f7d502c68c
commit
b84dc8551a
@ -42,16 +42,16 @@ ExportModsToStringDialog::ExportModsToStringDialog(InstancePtr instance, QWidget
|
|||||||
mcInstance->loaderModList()->update();
|
mcInstance->loaderModList()->update();
|
||||||
connect(mcInstance->loaderModList().get(), &ModFolderModel::updateFinished, this, [this, mcInstance]() {
|
connect(mcInstance->loaderModList().get(), &ModFolderModel::updateFinished, this, [this, mcInstance]() {
|
||||||
m_allMods = mcInstance->loaderModList()->allMods();
|
m_allMods = mcInstance->loaderModList()->allMods();
|
||||||
trigger();
|
triggerImp();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(ui->formatComboBox, &QComboBox::currentIndexChanged, this, &ExportModsToStringDialog::formatChanged);
|
connect(ui->formatComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &ExportModsToStringDialog::formatChanged);
|
||||||
connect(ui->authorsCheckBox, &QCheckBox::stateChanged, this, &ExportModsToStringDialog::trigger);
|
connect(ui->authorsCheckBox, &QCheckBox::stateChanged, this, &ExportModsToStringDialog::trigger);
|
||||||
connect(ui->versionCheckBox, &QCheckBox::stateChanged, this, &ExportModsToStringDialog::trigger);
|
connect(ui->versionCheckBox, &QCheckBox::stateChanged, this, &ExportModsToStringDialog::trigger);
|
||||||
connect(ui->urlCheckBox, &QCheckBox::stateChanged, this, &ExportModsToStringDialog::trigger);
|
connect(ui->urlCheckBox, &QCheckBox::stateChanged, this, &ExportModsToStringDialog::trigger);
|
||||||
connect(ui->templateText, &QTextEdit::textChanged, this, &ExportModsToStringDialog::trigger);
|
connect(ui->templateText, &QTextEdit::textChanged, this, &ExportModsToStringDialog::triggerImp);
|
||||||
connect(ui->copyButton, &QPushButton::clicked, this, [this]() {
|
connect(ui->copyButton, &QPushButton::clicked, this, [this](bool) {
|
||||||
this->ui->finalText->selectAll();
|
this->ui->finalText->selectAll();
|
||||||
this->ui->finalText->copy();
|
this->ui->finalText->copy();
|
||||||
});
|
});
|
||||||
@ -81,10 +81,10 @@ void ExportModsToStringDialog::formatChanged(int index)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trigger();
|
triggerImp();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportModsToStringDialog::trigger()
|
void ExportModsToStringDialog::triggerImp()
|
||||||
{
|
{
|
||||||
ExportToString::Formats format;
|
ExportToString::Formats format;
|
||||||
switch (ui->formatComboBox->currentIndex()) {
|
switch (ui->formatComboBox->currentIndex()) {
|
||||||
|
@ -36,7 +36,8 @@ class ExportModsToStringDialog : public QDialog {
|
|||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void formatChanged(int index);
|
void formatChanged(int index);
|
||||||
void trigger();
|
void triggerImp();
|
||||||
|
void trigger(int) { triggerImp(); };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList<Mod*> m_allMods;
|
QList<Mod*> m_allMods;
|
||||||
|
Loading…
Reference in New Issue
Block a user