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:
authorCampbell Barton <ideasman42@gmail.com>2020-01-09 03:00:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-09 03:07:28 +0300
commit830aa758b40bea7b40116049a3535103337a3003 (patch)
tree95a26da7efbfe17769330584807bc5111484b179 /source/blender/windowmanager/gizmo
parent99c798b8a623fdf40d592a2b48304ebe77040f4a (diff)
Fix T72900: Mouse-move causes redraw when gizmos are hidden
Move redraw tagging to the gesture modal operator to make sure this only runs when it's needed. Caused by d591c8a350310, which tagged the region to redraw when the gizmos were tagged to refresh, however they wont redraw when hidden. Thanks to @jbakker for finding the root cause.
Diffstat (limited to 'source/blender/windowmanager/gizmo')
-rw-r--r--source/blender/windowmanager/gizmo/WM_gizmo_api.h3
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c10
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
index c2fbaaaa83c..e66243009f1 100644
--- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h
+++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
@@ -285,7 +285,8 @@ eWM_GizmoFlagMapDrawStep WM_gizmomap_drawstep_from_gizmo_group(const struct wmGi
void WM_gizmomap_tag_refresh_drawstep(struct wmGizmoMap *gzmap,
const eWM_GizmoFlagMapDrawStep drawstep);
void WM_gizmomap_tag_refresh(struct wmGizmoMap *gzmap);
-bool WM_gizmomap_tag_refresh_check(struct wmGizmoMap *gzmap);
+
+bool WM_gizmomap_tag_delay_refresh_for_tweak_check(struct wmGizmoMap *gzmap);
void WM_gizmomap_draw(struct wmGizmoMap *gzmap,
const struct bContext *C,
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
index c3dfdd9a419..59975080f49 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_map.c
@@ -333,13 +333,11 @@ void WM_gizmomap_tag_refresh(wmGizmoMap *gzmap)
}
}
-bool WM_gizmomap_tag_refresh_check(wmGizmoMap *gzmap)
+bool WM_gizmomap_tag_delay_refresh_for_tweak_check(wmGizmoMap *gzmap)
{
- if (gzmap) {
- for (int i = 0; i < WM_GIZMOMAP_DRAWSTEP_MAX; i++) {
- if (gzmap->update_flag[i] & (GIZMOMAP_IS_PREPARE_DRAW | GIZMOMAP_IS_REFRESH_CALLBACK)) {
- return true;
- }
+ for (wmGizmoGroup *gzgroup = gzmap->groups.first; gzgroup; gzgroup = gzgroup->next) {
+ if (gzgroup->hide.delay_refresh_for_tweak) {
+ return true;
}
}
return false;