Page MenuHome

Text Editor Footer Duplicates
Closed, ResolvedPublic


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

In the bottom right, you can already see 3 footers stacked on top of each other.

To get more footers:

  • Save the file
  • Revert

Event Timeline

George Vogiatzis (Gvgeo) claimed this task.
George Vogiatzis (Gvgeo) triaged this task as Confirmed, Medium priority.

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

@Jacques Lucke (JacquesLucke) @Brecht Van Lommel (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-> {
			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) {
						/* if (!ar_header->next == RGN_TYPE_FOOTER) { */

							BLI_insertlinkafter(regionbase, ar_header, ar);

							ar->regiontype = RGN_TYPE_FOOTER;
							ar->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_TOP : RGN_ALIGN_BOTTOM;
						/* } */