From 9d690cddd60245cd3c16498e6c83183ec8446241 Mon Sep 17 00:00:00 2001 From: "zhou.xu" Date: Wed, 23 Apr 2025 10:07:21 +0800 Subject: [PATCH] FIX:add tooltip(const std::string &label, float wrap_width) api jira: none Change-Id: I2372f57177a362f540e509747552a4a27f23fe8f --- src/slic3r/GUI/ImGuiWrapper.cpp | 4 ++++ src/slic3r/GUI/ImGuiWrapper.hpp | 1 + 2 files changed, 5 insertions(+) diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp index 39f0a6685..bdaf13825 100644 --- a/src/slic3r/GUI/ImGuiWrapper.cpp +++ b/src/slic3r/GUI/ImGuiWrapper.cpp @@ -1138,6 +1138,10 @@ void ImGuiWrapper::tooltip(const char *label, float wrap_width) ImGui::EndTooltip(); } +void ImGuiWrapper::tooltip(const std::string &label, float wrap_width) { + tooltip(label.c_str(), wrap_width); +} + void ImGuiWrapper::tooltip(const wxString &label, float wrap_width) { ImGui::BeginTooltip(); diff --git a/src/slic3r/GUI/ImGuiWrapper.hpp b/src/slic3r/GUI/ImGuiWrapper.hpp index a4c4c8599..b115e54a6 100644 --- a/src/slic3r/GUI/ImGuiWrapper.hpp +++ b/src/slic3r/GUI/ImGuiWrapper.hpp @@ -168,6 +168,7 @@ public: void text_wrapped(const std::string &label, float wrap_width); void text_wrapped(const wxString &label, float wrap_width); void tooltip(const char *label, float wrap_width); + void tooltip(const std::string &label, float wrap_width); void tooltip(const wxString &label, float wrap_width); void filament_group(const std::string &filament_type, const char *hex_color, unsigned char filament_id, float align_width);