mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-28 21:03:12 +08:00
ENH:Only display one instance of duplicated warnings
jira:[STUDIO-10756] Change-Id: I0a42341677cc9c15f2d6ef3c9223b6f86c248fd2
This commit is contained in:
parent
d3ac9a4b9d
commit
a5123f132d
@ -173,7 +173,6 @@ PrinterMsgPanel::PrinterMsgPanel(wxWindow *parent)
|
||||
|
||||
void PrinterMsgPanel::SetLabelList(const std::vector<wxString> &texts, const wxColour &colour)
|
||||
{
|
||||
|
||||
if (texts == m_last_texts)
|
||||
return;
|
||||
|
||||
@ -181,17 +180,16 @@ void PrinterMsgPanel::SetLabelList(const std::vector<wxString> &texts, const wxC
|
||||
|
||||
m_labels.clear();
|
||||
m_sizer->Clear(true);
|
||||
//for (auto *label : m_labels) {
|
||||
// m_sizer->Detach(label);
|
||||
// label->Destroy();
|
||||
//}
|
||||
//m_labels.clear();
|
||||
|
||||
std::set<wxString> unique_texts;
|
||||
|
||||
for (const wxString &text : texts) {
|
||||
if (text.empty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!unique_texts.insert(text).second) {
|
||||
continue;
|
||||
}
|
||||
Label *label = new Label(this);
|
||||
label->SetFont(::Label::Body_13);
|
||||
label->SetForegroundColour(colour);
|
||||
|
Loading…
x
Reference in New Issue
Block a user