X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FTooltips.C;h=d5e3defd6f807d3b3d9517f8844809151067f5cb;hb=8daf842ccd447521676dfcb9dbcd9a541e997e6f;hp=3bcc3e6fee5d160ca3fedf9bb0d81b3f34ec2efe;hpb=15096a4532e930aff654ca58f1556e45e7d52b41;p=lyx.git diff --git a/src/frontends/xforms/Tooltips.C b/src/frontends/xforms/Tooltips.C index 3bcc3e6fee..d5e3defd6f 100644 --- a/src/frontends/xforms/Tooltips.C +++ b/src/frontends/xforms/Tooltips.C @@ -52,12 +52,10 @@ void Tooltips::toggleEnabled() void Tooltips::set() { if (tooltipsMap.empty()) - // There are no objects with tooltips in this dialog, so - // just go away. Don't change the cursor to a question mark. return; - TooltipsMap::iterator it = tooltipsMap.begin(); - TooltipsMap::iterator end = tooltipsMap.end(); + TooltipsMap::const_iterator it = tooltipsMap.begin(); + TooltipsMap::const_iterator end = tooltipsMap.end(); for (; it != end; ++it) { FL_OBJECT * const ob = it->first; char const * const c_str = enabled_ ? it->second.c_str() : 0; @@ -70,17 +68,8 @@ void Tooltips::init(FL_OBJECT * ob, string const & tip) { lyx::Assert(ob && ob->form); - // Paranoia check! - TooltipsMap::const_iterator it = tooltipsMap.find(ob); - if (it != tooltipsMap.end()) - return; - - string str = trim(tip); - if (str.empty()) - return; - // Store the tooltip string - str = formatted(str, 400); + string const str = formatted(trim(tip), 400); tooltipsMap[ob] = str; // Set the tooltip