]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Tooltips.C
fix crash with "save as"
[lyx.git] / src / frontends / xforms / Tooltips.C
index d49797a3487cea8973d7352c10286e730d7933d3..3bcc3e6fee5d160ca3fedf9bb0d81b3f34ec2efe 100644 (file)
@@ -75,12 +75,17 @@ void Tooltips::init(FL_OBJECT * ob, string const & tip)
        if (it != tooltipsMap.end())
                return;
 
-       string const str = trim(tip);
+       string str = trim(tip);
        if (str.empty())
                return;
 
        // Store the tooltip string
-       tooltipsMap[ob] = formatted(str, 400);
+       str = formatted(str, 400);
+       tooltipsMap[ob] = str;
+
+       // Set the tooltip
+       char const * const c_str = enabled_ ? str.c_str() : 0;
+       fl_set_object_helper(ob, c_str);
 }