Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-07-01 17:56:38 +0300
committerYuSanka <yusanka@gmail.com>2019-07-01 17:56:38 +0300
commite5e7496cea88cd18afa9a83a95e1ed596c5a69c5 (patch)
treebdd6089949eae9cd301d2e404ab632eafee9762c /src/slic3r/GUI/Field.cpp
parenta934c2e79c64273db45e7bc22835eb147488d81b (diff)
Some changes for options tooltips
Diffstat (limited to 'src/slic3r/GUI/Field.cpp')
-rw-r--r--src/slic3r/GUI/Field.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp
index 7f42db4d7..e84e9637f 100644
--- a/src/slic3r/GUI/Field.cpp
+++ b/src/slic3r/GUI/Field.cpp
@@ -113,11 +113,19 @@ wxString Field::get_tooltip_text(const wxString& default_string)
wxString tooltip_text("");
wxString tooltip = _(m_opt.tooltip);
edit_tooltip(tooltip);
+
+ std::string opt_id = m_opt_id;
+ auto hash_pos = opt_id.find("#");
+ if (hash_pos != std::string::npos) {
+ opt_id.replace(hash_pos, 1,"[");
+ opt_id += "]";
+ }
+
if (tooltip.length() > 0)
tooltip_text = tooltip + "\n" + _(L("default value")) + "\t: " +
- (boost::iends_with(m_opt_id, "_gcode") ? "\n" : "") + default_string +
- (boost::iends_with(m_opt_id, "_gcode") ? "" : "\n") +
- _(L("parameter name")) + "\t: " + m_opt_id;
+ (boost::iends_with(opt_id, "_gcode") ? "\n" : "") + default_string +
+ (boost::iends_with(opt_id, "_gcode") ? "" : "\n") +
+ _(L("parameter name")) + "\t: " + opt_id;
return tooltip_text;
}