Text Editor Footer Duplicates #63386

Closed
opened 2019-04-08 09:14:28 +02:00 by Philip Holzmann · 8 comments

System Information
Operating system: Windows 10 64 bit
Graphics card: Nvidia GTX 750 Ti

Blender Version
Broken: (blender-2.80.0-git.d2d84132ddf9-windows64)

Short description of error
The footer in the Text Editor that says "Text: Internal" duplicates every time the file is saved and reloaded.

Exact steps for others to reproduce the error
bug.blend
In the bottom right, you can already see 3 footers stacked on top of each other.

To get more footers:

  • Save the file
  • Revert
**System Information** Operating system: Windows 10 64 bit Graphics card: Nvidia GTX 750 Ti **Blender Version** Broken: (blender-2.80.0-git.d2d84132ddf9-windows64) **Short description of error** The footer in the Text Editor that says "Text: Internal" duplicates every time the file is saved and reloaded. **Exact steps for others to reproduce the error** [bug.blend](https://archive.blender.org/developer/F6918432/bug.blend) In the bottom right, you can already see 3 footers stacked on top of each other. To get more footers: - Save the file - Revert

Added subscriber: @Foaly

Added subscriber: @Foaly

Added subscriber: @Gvgeo-1

Added subscriber: @Gvgeo-1
George Vogiatzis self-assigned this 2019-04-08 09:21:25 +02:00

The file didn't work.
But can confirm, will take a look at it.

The file didn't work. But can confirm, will take a look at it.

Added subscribers: @JacquesLucke, @brecht

Added subscribers: @JacquesLucke, @brecht

@JacquesLucke @brecht
It looks like a version bump needed with footer.

Now there are some files saved with 1 or more footers already.

With adding a check,
if (!ar_header->next == RGN_TYPE_FOOTER) {
Ensures that no more footers will be added. And does not require version bump right now.

Should remove all the spares too? Or simply just version bump?
What is the correct action?

	/*if (!MAIN_VERSION_ATLEAST(bmain, 280, 55)) { */
	
		/* Versioning code until next subversion bump goes here. */
	{
		for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
			for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
				for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
					if (sl->spacetype == SPACE_TEXT) {
						ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
						ARegion *ar = MEM_callocN(sizeof(ARegion), "footer for text");
						ARegion *ar_header = NULL;

						for (ar_header = regionbase->first; ar_header; ar_header = ar_header->next) {
							if (ar_header->regiontype == RGN_TYPE_HEADER) {
								break;
							}
						}
						/* if (!ar_header->next == RGN_TYPE_FOOTER) { */
							BLI_assert(ar_header);

							BLI_insertlinkafter(regionbase, ar_header, ar);

							ar->regiontype = RGN_TYPE_FOOTER;
							ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM;
						/* } */
					}
				}
			}
		}
	}
@JacquesLucke @brecht It looks like a version bump needed with footer. Now there are some files saved with 1 or more footers already. With adding a check, `if (!ar_header->next == RGN_TYPE_FOOTER) {` Ensures that no more footers will be added. And does not require version bump right now. Should remove all the spares too? Or simply just version bump? What is the correct action? ``` /*if (!MAIN_VERSION_ATLEAST(bmain, 280, 55)) { */ /* Versioning code until next subversion bump goes here. */ { for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) { for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) { for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) { if (sl->spacetype == SPACE_TEXT) { ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase; ARegion *ar = MEM_callocN(sizeof(ARegion), "footer for text"); ARegion *ar_header = NULL; for (ar_header = regionbase->first; ar_header; ar_header = ar_header->next) { if (ar_header->regiontype == RGN_TYPE_HEADER) { break; } } /* if (!ar_header->next == RGN_TYPE_FOOTER) { */ BLI_assert(ar_header); BLI_insertlinkafter(regionbase, ar_header, ar); ar->regiontype = RGN_TYPE_FOOTER; ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM; /* } */ } } } } } ```

made a patch D4663.

made a patch [D4663](https://archive.blender.org/developer/D4663).

This issue was referenced by 7655b32999

This issue was referenced by 7655b32999a0720ea9fcba6610bc9f4fbb56de25

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
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
4 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#63386
No description provided.