Fix #110632: temp context doesn't always restore original area or region at exit. #110787

Closed
Bastien Montagne wants to merge 1 commits from mont29:F-110632 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Why exactly not explicitely restoring the context with cxt_init
values leaves relevant values to null is unclear to me? But this patch
seems to fix it, by considering that if a temp context value is set,
then it needs to be restored from the init value at the end, even if
both init and temp values are the same.

Why exactly not explicitely restoring the context with `cxt_init` values leaves relevant values to null is unclear to me? But this patch seems to fix it, by considering that if a temp context value is set, then it needs to be restored from the init value at the end, even if both init and temp values are the same.
Bastien Montagne added 1 commit 2023-08-04 10:56:31 +02:00
a78e40bd3b Fix #110632: temp context doesn't always restore original area or region at exit.
Why exactly not explicitely restoring the context with `cxt_init`
values leaves relevant values to null is unclear to me? But this patch
seems to fix it, by considering that if a temp context value is set,
then it needs to be restored from the init value at the end, even if
both init and temp values are the same.
Author
Owner

@ideasman42 would love to summon you on this one. ;)

I suspect you'd understand why restoring context area etc. is needed, even when temp values are the same as init ones?

@ideasman42 would love to summon you on this one. ;) I suspect you'd understand why restoring context area etc. is needed, even when temp values are the same as init ones?
Bastien Montagne requested review from Campbell Barton 2023-08-04 12:10:37 +02:00

@mont29 thanks for looking into this, I dug into the problem and there was in fact another related problem that #110632 didn't cover.
Committed a fix to resolve both with some explanation for whats going on: 0df7d100a3

As it happens this didn't show up in testing because overrides worked as long as the overrides were changing the context, the problems only show up when overriding a value to it's self.

@mont29 thanks for looking into this, I dug into the problem and there was in fact another related problem that #110632 didn't cover. Committed a fix to resolve both with some explanation for whats going on: 0df7d100a3befd44c7ed4c0217690c0eb1245746 As it happens this didn't show up in testing because overrides worked as long as the overrides were changing the context, the problems only show up when overriding a value to it's self.
Campbell Barton closed this pull request 2023-08-09 08:58:56 +02:00
Bastien Montagne deleted branch F-110632 2023-08-09 09:53:49 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#110787
No description provided.