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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-12 17:57:01 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-06-12 18:07:18 +0300
commit376bc88dc027a8dfc5bd2f92253b17738b825c39 (patch)
tree8b6fe0d4f7be2afcebfe8f7612facc547e44dfbf /source/blender/windowmanager/intern
parent3801736b891ea0a1ca3c9a8927a44d38527fcefc (diff)
Fix leak of manipulator tooltip timers.
This was causing performance degradation over time in posing, as the manipulator recomputes the center locations for every event. Ref T55442.
Diffstat (limited to 'source/blender/windowmanager/intern')
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c3
-rw-r--r--source/blender/windowmanager/intern/wm_tooltip.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index a6b76796c7f..00f5f6c1368 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -2386,8 +2386,7 @@ static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers
if (event->type == MOUSEMOVE && !wm_manipulatormap_modal_get(mmap)) {
int part;
mpr = wm_manipulatormap_highlight_find(mmap, C, event, &part);
- wm_manipulatormap_highlight_set(mmap, C, mpr, part);
- if (mpr != NULL) {
+ if (wm_manipulatormap_highlight_set(mmap, C, mpr, part) && mpr != NULL) {
WM_tooltip_timer_init(C, CTX_wm_window(C), region, WM_manipulatormap_tooltip_init);
}
}
diff --git a/source/blender/windowmanager/intern/wm_tooltip.c b/source/blender/windowmanager/intern/wm_tooltip.c
index 6096317b582..94a44a97afd 100644
--- a/source/blender/windowmanager/intern/wm_tooltip.c
+++ b/source/blender/windowmanager/intern/wm_tooltip.c
@@ -41,6 +41,8 @@ void WM_tooltip_timer_init(
bContext *C, wmWindow *win, ARegion *ar,
wmTooltipInitFn init)
{
+ WM_tooltip_timer_clear(C, win);
+
bScreen *screen = WM_window_get_active_screen(win);
wmWindowManager *wm = CTX_wm_manager(C);
if (screen->tool_tip == NULL) {