2525#include < QTimer>
2626
2727#include " minecraft/mod/ModpackChangelogGenerator.h"
28+ #include " minecraft/MinecraftInstance.h"
2829
2930ModpackCreatorPage::ModpackCreatorPage (MinecraftInstance* inst, QWidget* parent)
3031 : QWidget(parent), ui(new Ui::ModpackCreatorPage), m_inst(inst)
@@ -33,7 +34,6 @@ ModpackCreatorPage::ModpackCreatorPage(MinecraftInstance* inst, QWidget* parent)
3334
3435 // Load existing metadata
3536 auto * settings = m_inst->settings ();
36- bool isModpack = settings->get (" ModpackCreatorEnabled" ).toBool ();
3737 QString modpackName = settings->get (" ModpackCreatorName" ).toString ();
3838 QString modpackAuthor = settings->get (" ModpackCreatorAuthor" ).toString ();
3939
@@ -85,6 +85,15 @@ void ModpackCreatorPage::on_markAsModpackBtn_clicked()
8585 updateUI ();
8686}
8787
88+ void ModpackCreatorPage::on_markAsOldVersionBtn_clicked ()
89+ {
90+ ModpackChangelogGenerator generator (m_inst);
91+ generator.createSnapshot ();
92+
93+ // Auto-generate the changelog immediately after taking the snapshot to show it
94+ on_generateChangelogBtn_clicked ();
95+ }
96+
8897void ModpackCreatorPage::on_generateChangelogBtn_clicked ()
8998{
9099 ModpackChangelogGenerator generator (m_inst);
@@ -167,7 +176,7 @@ void ModpackCreatorPage::refreshVersionInfo()
167176 int snapshotCount = generator.getSnapshotCount ();
168177
169178 if (snapshotCount == 0 ) {
170- ui->versionInfoLabel ->setText (tr (" No snapshots yet. Click \" Generate Changelog \" to create the first one ." ));
179+ ui->versionInfoLabel ->setText (tr (" No snapshots yet. Click \" Mark as Old Version \" to create the baseline ." ));
171180 } else {
172181 auto latest = generator.getLatestSnapshot ();
173182 ui->versionInfoLabel ->setText (
0 commit comments