mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-24 08:38:40 -07:00
ENH:The print interface prompt appears repeatedly
jira:[STUDIO-12376] Change-Id: Ifff298e08d671ae19a719cc91a645118ccf75bc2 (cherry picked from commit 3dc9acdce5db9cf9f04e3b106ba3b75e04d74d86)
This commit is contained in:
parent
faa8708c3a
commit
ab6b1b3760
1 changed files with 20 additions and 14 deletions
|
|
@ -2152,20 +2152,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…
Add table
Add a link
Reference in a new issue