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:
authorJulian Eisel <julianeisel@Julians-MacBook-Pro.local>2020-04-30 19:58:05 +0300
committerJulian Eisel <julian@blender.org>2020-04-30 20:20:01 +0300
commit8e08d80e52d6e1ab15e6b9726b5757fbaa2e6cf6 (patch)
treee2f03dea063777b1ff60c513c463450f31d14277 /source/blender/editors/screen
parentd44f323df5db147d12aaad673a761404cb19707a (diff)
Fix dragging panels changing region size
While dragging panels, the region size would change which would feel glitchy. See D7462 for a demo of the issue.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 69cfe72308f..bbc6b9e7c86 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -2515,6 +2515,7 @@ void ED_region_panels_layout_ex(const bContext *C,
int margin_x = 0;
const bool region_layout_based = region->flag & RGN_FLAG_DYNAMIC_SIZE;
const bool is_context_new = (contextnr != -1) ? UI_view2d_tab_set(v2d, contextnr) : false;
+ bool update_tot_size = true;
/* before setting the view */
if (vertical) {
@@ -2583,6 +2584,11 @@ void ED_region_panels_layout_ex(const bContext *C,
}
}
+ if (panel && UI_panel_is_dragging(panel)) {
+ /* Prevent View2d.tot rectangle size changes while dragging panels. */
+ update_tot_size = false;
+ }
+
ed_panel_draw(C, area, region, &region->panels, pt, panel, w, em, vertical);
}
@@ -2638,8 +2644,10 @@ void ED_region_panels_layout_ex(const bContext *C,
y = -y;
}
- /* this also changes the 'cur' */
- UI_view2d_totRect_set(v2d, x, y);
+ if (update_tot_size) {
+ /* this also changes the 'cur' */
+ UI_view2d_totRect_set(v2d, x, y);
+ }
if (use_category_tabs) {
region->runtime.category = category;