mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-05 14:20:40 +08:00
ENH:The print interface prompt appears repeatedly
jira:[STUDIO-12376] Change-Id: Ifff298e08d671ae19a719cc91a645118ccf75bc2
This commit is contained in:
parent
849bfff512
commit
3dc9acdce5
@ -2157,20 +2157,26 @@ void SelectMachineDialog::on_ok_btn(wxCommandEvent &event)
|
||||
{
|
||||
bool has_warning_msg = false;
|
||||
bool has_normal_msg = false;
|
||||
if (confirm_text.size() > 1)
|
||||
{
|
||||
for (auto i = 0; i < confirm_text.size(); i++)
|
||||
{
|
||||
confirm_text[i].text = wxString::Format("%d. %s", i + 1, confirm_text[i].text);
|
||||
if (confirm_text[i].level == ConfirmBeforeSendInfo::InfoLevel::Warning)
|
||||
{
|
||||
has_warning_msg = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
has_normal_msg = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (confirm_text.size() > 1) {
|
||||
std::unordered_set<wxString> seen_texts;
|
||||
std::vector<ConfirmBeforeSendInfo> unique_texts;
|
||||
|
||||
for (const auto &item : confirm_text) {
|
||||
if (seen_texts.insert(item.text).second)
|
||||
{
|
||||
unique_texts.push_back(item);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < unique_texts.size(); ++i) {
|
||||
unique_texts[i].text = wxString::Format("%d. %s", i + 1, unique_texts[i].text);
|
||||
if (unique_texts[i].level == ConfirmBeforeSendInfo::InfoLevel::Warning)
|
||||
has_warning_msg = true;
|
||||
else
|
||||
has_normal_msg = true;
|
||||
}
|
||||
confirm_text.swap(unique_texts);
|
||||
}
|
||||
|
||||
std::vector<ConfirmBeforeSendInfo> shown_infos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user