mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-28 10:33:12 +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_warning_msg = false;
|
||||||
bool has_normal_msg = false;
|
bool has_normal_msg = false;
|
||||||
if (confirm_text.size() > 1)
|
|
||||||
{
|
if (confirm_text.size() > 1) {
|
||||||
for (auto i = 0; i < confirm_text.size(); i++)
|
std::unordered_set<wxString> seen_texts;
|
||||||
{
|
std::vector<ConfirmBeforeSendInfo> unique_texts;
|
||||||
confirm_text[i].text = wxString::Format("%d. %s", i + 1, confirm_text[i].text);
|
|
||||||
if (confirm_text[i].level == ConfirmBeforeSendInfo::InfoLevel::Warning)
|
for (const auto &item : confirm_text) {
|
||||||
{
|
if (seen_texts.insert(item.text).second)
|
||||||
has_warning_msg = true;
|
{
|
||||||
}
|
unique_texts.push_back(item);
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
has_normal_msg = true;
|
|
||||||
}
|
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;
|
std::vector<ConfirmBeforeSendInfo> shown_infos;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user