diff --git a/src/slic3r/GUI/NotificationManager.cpp b/src/slic3r/GUI/NotificationManager.cpp
index 23a2f1c2e..244d74fd2 100644
--- a/src/slic3r/GUI/NotificationManager.cpp
+++ b/src/slic3r/GUI/NotificationManager.cpp
@@ -357,6 +357,19 @@ void NotificationManager::PopNotification::count_lines()
if (text.empty())
return;
+ // handle with marks
+ if (pos_start == string::npos && pos_end == string::npos) {
+ pos_start = text.find(error_start);
+ if (pos_start != string::npos) {
+ text.erase(pos_start, error_start.length());
+ pos_end = text.find(error_end);
+ if (pos_end != string::npos) {
+ text.erase(pos_end, error_end.length());
+ }
+ }
+ m_text1 = text;
+ }
+
m_endlines.clear();
while (last_end < text.length() - 1)
{
@@ -481,7 +494,14 @@ void NotificationManager::PopNotification::render_text(ImGuiWrapper& imgui, cons
if (m_text1.size() > m_endlines[i])
last_end += (m_text1[m_endlines[i]] == '\n' || m_text1[m_endlines[i]] == ' ' ? 1 : 0);
- imgui.text(line.c_str());
+ if (pos_start != string::npos && pos_end != string::npos&& m_endlines[i] - line.length() >= pos_start && m_endlines[i] <= pos_end) {
+ push_style_color(ImGuiCol_Text, m_ErrorColor, m_state == EState::FadingOut, m_current_fade_opacity);
+ imgui.text(line.c_str());
+ ImGui::PopStyleColor();
+ }
+ else {
+ imgui.text(line.c_str());
+ }
}
}
//hyperlink text
diff --git a/src/slic3r/GUI/NotificationManager.hpp b/src/slic3r/GUI/NotificationManager.hpp
index a821acc90..0070d12bb 100644
--- a/src/slic3r/GUI/NotificationManager.hpp
+++ b/src/slic3r/GUI/NotificationManager.hpp
@@ -488,6 +488,11 @@ private:
std::string m_hypertext;
// Aditional text after hypertext - currently not used
std::string m_text2;
+ // mark for render operation
+ size_t pos_start = string::npos;
+ size_t pos_end = string::npos;
+ std::string error_start = "";
+ std::string error_end = "";
// inner variables to position notification window, texts and buttons correctly
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 9caaa76e9..e71dfb569 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -11109,13 +11109,15 @@ void Plater::show_object_info()
wxString info_manifold;
int non_manifold_edges = 0;
auto mesh_errors = p->sidebar->obj_list()->get_mesh_errors_info(&info_manifold, &non_manifold_edges);
- info_text += into_u8(info_manifold);
#ifndef __WINDOWS__
if (non_manifold_edges > 0) {
- info_text += into_u8("\n" + _L("Tips:") + "\n" +_L("\"Fix Model\" feature is currently only on Windows. Please repair the model on Bambu Studio(windows) or CAD softwares."));
+ info_manifold += into_u8("\n" + _L("Tips:") + "\n" +_L("\"Fix Model\" feature is currently only on Windows. Please repair the model on Bambu Studio(windows) or CAD softwares."));
}
#endif //APPLE & LINUX
+
+ info_manifold = "" + info_manifold + "";
+ info_text += into_u8(info_manifold);
notify_manager->bbl_show_objectsinfo_notification(info_text, is_windows10()&&(non_manifold_edges > 0), !(p->current_panel == p->view3D));
}