On Monday 09 September 2002 2:27 pm, R. Lahaye wrote: > > void Tooltips::init(FL_OBJECT * ob, string const & tip) > > { > > lyx::Assert(ob && ob->form); > > tooltipsMap[ob] = formatted(trim(tip), 400); > > } > > No, doesn't help. Problem remains. Somehow Tooltips disables > overwriting an existing tooltip text, or writes the second > time somewhere where it has no effect. Don't know. > > Rob.
I'm surprised, since Tooltips::set() fills the xforms tooltip from the map. What happens if you toggle the tooltips off and then on again. Is the thing reset? Just to be on the safe side add a dialgnostic print statement to the end of the init method. void Tooltips::init(FL_OBJECT * ob, string const & tip) { lyx::Assert(ob && ob->form); tooltipsMap[ob] = formatted(trim(tip), 400); lyxerr << "Tooltip: " << tooltipsMap[ob] << std::endl; } Similarly add something to Tooltips::set() so that you can ascertain when it is invoked. void Tooltips::set() { lyxerr << "Tooltips::set() " std::endl; 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(); for (; it != end; ++it) { FL_OBJECT * const ob = it->first; char const * const c_str = enabled_ ? it->second.c_str() : 0; fl_set_object_helper(ob, c_str); } } Angus