GH-1556 disable export for tracked FTB instances
This commit is contained in:
parent
72c92893a5
commit
4392abfb8d
@ -1630,6 +1630,7 @@ void MainWindow::instanceChanged(const QModelIndex ¤t, const QModelIndex &
|
||||
ui->instanceToolBar->setEnabled(true);
|
||||
ui->actionLaunchInstance->setEnabled(m_selectedInstance->canLaunch());
|
||||
ui->actionLaunchInstanceOffline->setEnabled(m_selectedInstance->canLaunch());
|
||||
ui->actionExportInstance->setEnabled(m_selectedInstance->canExport());
|
||||
renameButton->setText(m_selectedInstance->name());
|
||||
m_statusLeft->setText(m_selectedInstance->getStatusbarDescription());
|
||||
updateInstanceToolIcon(m_selectedInstance->iconKey());
|
||||
|
@ -206,6 +206,7 @@ public:
|
||||
void unsetFlag(const InstanceFlag flag);
|
||||
|
||||
bool canLaunch() const;
|
||||
virtual bool canExport() const = 0;
|
||||
|
||||
virtual bool reload();
|
||||
|
||||
|
@ -83,4 +83,8 @@ public:
|
||||
{
|
||||
return "Null";
|
||||
}
|
||||
bool canExport() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
@ -10,4 +10,8 @@ public:
|
||||
virtual QString id() const;
|
||||
virtual void copy(const QDir &newDir);
|
||||
virtual QString typeName() const;
|
||||
bool canExport() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
@ -21,7 +21,10 @@ public:
|
||||
QDir versionsPath() const override;
|
||||
bool providesVersionFile() const override;
|
||||
virtual QString typeName() const override;
|
||||
|
||||
bool canExport() const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
private:
|
||||
SettingsObjectPtr m_globalSettings;
|
||||
};
|
||||
|
@ -124,6 +124,11 @@ public:
|
||||
|
||||
virtual QString typeName() const override;
|
||||
|
||||
bool canExport() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
mutable std::shared_ptr<ModList> jar_mod_list;
|
||||
mutable std::shared_ptr<ModList> core_mod_list;
|
||||
|
@ -94,6 +94,11 @@ public:
|
||||
|
||||
virtual QString typeName() const override;
|
||||
|
||||
bool canExport() const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
signals:
|
||||
void versionReloaded();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user