mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-16 15:33:13 +08:00
Fixed vendor page title (using name from manifest instead of id)
This commit is contained in:
parent
de584c3055
commit
cba98ecdca
@ -1808,9 +1808,17 @@ void PageMode::serialize_mode(AppConfig *app_config) const
|
||||
app_config->set("use_inches", check_inch->GetValue() ? "1" : "0");
|
||||
}
|
||||
|
||||
PageVendors::PageVendors(ConfigWizard* parent, std::string repo_id /*= wxEmptyString*/)
|
||||
: ConfigWizardPage(parent, repo_id.empty() ? _L("Other Vendors") : format_wxstr(_L("%1% Vendors"), repo_id),
|
||||
repo_id.empty() ? _L("Other Vendors") : format_wxstr(_L("%1% Vendors"), repo_id))
|
||||
wxString repo_title(const std::string& repo_id, const std::string& repo_name)
|
||||
{
|
||||
if (repo_name.empty())
|
||||
{
|
||||
return repo_id.empty() ? _L("Other Vendors") : format_wxstr(_L("%1% Vendors"), repo_id);
|
||||
}
|
||||
return repo_name;
|
||||
}
|
||||
|
||||
PageVendors::PageVendors(ConfigWizard* parent, std::string repo_id /*= wxEmptyString*/, std::string repo_name)
|
||||
: ConfigWizardPage(parent, repo_title(repo_id, repo_name),repo_title(repo_id, repo_name))
|
||||
{
|
||||
const AppConfig &appconfig = this->wizard_p()->appconfig_new;
|
||||
|
||||
@ -3680,7 +3688,7 @@ void ConfigWizard::priv::load_pages_from_archive()
|
||||
// pages needs to be added into repositories before page_vendors creation
|
||||
repositories.push_back({ data.id, nullptr, pages});
|
||||
|
||||
PageVendors* page_vendors = new PageVendors(q, data.id);
|
||||
PageVendors* page_vendors = new PageVendors(q, data.id, data.name);
|
||||
repositories[repositories.size() - 1].vendors_page = page_vendors;
|
||||
|
||||
add_page(page_vendors);
|
||||
|
@ -485,7 +485,7 @@ struct PageMode: ConfigWizardPage
|
||||
|
||||
struct PageVendors: ConfigWizardPage
|
||||
{
|
||||
PageVendors(ConfigWizard *parent, std::string repos_id = std::string());
|
||||
PageVendors(ConfigWizard *parent, std::string repos_id = std::string(), std::string name = std::string());
|
||||
};
|
||||
|
||||
struct PageFirmware: ConfigWizardPage
|
||||
|
Loading…
x
Reference in New Issue
Block a user