Only update tooltips if there is an actual change -- #7268
Changing a tooltip resets the timeout. In one particular case, while rolling, AudioClock::set() is calling set_tooltip() at a rate faster than the tooltip timeout and prevents tooltip from showing at all (even if there is no actual change to the tooltip text). Alas, there is no trivial fix for this UI side and there may be other such cases. A central check is more than practical.
This commit is contained in:
parent
d0539f5e8a
commit
4983eb565d
@ -483,7 +483,14 @@ UI::do_request (UIRequest* req)
|
||||
|
||||
} else if (req->type == SetTip) {
|
||||
|
||||
gtk_widget_set_tooltip_markup (req->widget->gobj(), req->msg);
|
||||
gchar* old = gtk_widget_get_tooltip_markup (req->widget->gobj());
|
||||
if (
|
||||
(old && req->msg && strcmp (old, req->msg))
|
||||
||
|
||||
((old == NULL) != (req->msg == NULL || req->msg[0] == '\0'))
|
||||
) {
|
||||
gtk_widget_set_tooltip_markup (req->widget->gobj(), req->msg);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user