mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH:Only display one instance of duplicated warnings
jira:[STUDIO-10756] Change-Id: I0a42341677cc9c15f2d6ef3c9223b6f86c248fd2 (cherry picked from commit a5123f132dfd87ab61c12b7281186ca57201373e)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user