mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-15 08:59:39 -07: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:
parent
b533e6fe5f
commit
860e0f6308
1 changed files with 5 additions and 7 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue