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:
authorSeverin <eiseljulian@gmail.com>2018-06-29 03:04:46 +0300
committerSeverin <eiseljulian@gmail.com>2018-06-29 03:23:59 +0300
commitbe983295ea14af226b3c824a035ccee9d416c67f (patch)
treead395fba6f4f6a05de6cfce802febcf3542a046d /source/blender
parent4d39da1060105210a665e083b8d035f18b989a9f (diff)
Fix: Moving area edge could corrupt screen in very specific case
Caused by ca8f787349dcdf5. This issue is in master actually. Fixing it there would cause conflicts so won't do that unless needed ;) Steps to recreate were: * Split properties editor into two (default startup.blend) * Move both properties editors to the bottom, so only their headers are visible * Move the upper edge of the upper properties editor up and down Although it doesn't happen everytime, you may see the edge between the timeline and the 3D view move, while the region drawing doesn't update. What happened is area edge snapping allowed to snap the edge outside of window bounds (we snap to a 4px grid by default), which screen_vertices_scale interpreted as window scaling and thus run area size updates.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/screen/screen_ops.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 8a7af5b39c2..6aad4e98ab6 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -1366,6 +1366,7 @@ static int area_snap_calc_location(
final_loc = m_loc;
if (delta != bigger && delta != -smaller) {
final_loc -= (m_loc % AREAGRID);
+ CLAMP(final_loc, origval - smaller, origval + bigger);
}
break;
@@ -1428,10 +1429,10 @@ static void area_move_apply_do(
{
wmWindow *win = CTX_wm_window(C);
bScreen *sc = CTX_wm_screen(C);
+ short final_loc = -1;
bool doredraw = false;
- CLAMP(delta, -smaller, bigger);
- short final_loc = -1;
+ CLAMP(delta, -smaller, bigger);
if (snap_type == SNAP_NONE) {
final_loc = origval + delta;