[Bf-blender-cvs] [33f237d04c9] soc-2019-outliner: Outliner: Don't adjust horizontal scroll on show active

Nathan Craddock noreply at git.blender.org
Tue Jun 18 06:55:04 CEST 2019


Commit: 33f237d04c9ab99af5650bcb040be698f30690c2
Author: Nathan Craddock
Date:   Mon Jun 17 21:32:03 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB33f237d04c9ab99af5650bcb040be698f30690c2

Outliner: Don't adjust horizontal scroll on show active

The show active operator tried to scroll the outliner
horizontally to show the active object. On wide outliners this
caused a jittery redraw on mousemove. When the outliner
was more narrow, repeating the operation also caused
unexpected jittery redraws.

===================================================================

M	source/blender/editors/space_outliner/outliner_edit.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index de6e89e47c4..e2fddd149c5 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -1187,7 +1187,7 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
   View2D *v2d = &ar->v2d;
 
   TreeElement *te;
-  int xdelta, ytop;
+  int ytop;
 
   Object *obact = OBACT(view_layer);
 
@@ -1229,11 +1229,6 @@ static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
 
     v2d->cur.ymax = (float)ytop;
     v2d->cur.ymin = (float)(ytop - BLI_rcti_size_y(&v2d->mask));
-
-    /* make te->xs ==> te->xend center of view */
-    xdelta = (int)(te->xs - v2d->cur.xmin);
-    v2d->cur.xmin += xdelta;
-    v2d->cur.xmax += xdelta;
   }
 
   ED_region_tag_redraw_no_rebuild(ar);



More information about the Bf-blender-cvs mailing list