[Gtkradiant] Patch undo bug in 1.4/1.6 with entities (e.g. light)

Markus Fischer markus at fischer.name
Mon Jan 4 12:22:35 CST 2010

Hi Timothee,

I was wondering you could be so kind and look at a small patch I came up
with to fight an undo bug in the current and older version.


It was reported to me by Nerius and, bascially, you create a light
entity (best is you create it so that you see it also in the 3D view),
next move it (move it so it's still visible in the 3D view, this just
for help understanding the problem) and the undo that move (drag)
operation. This applies to all entities which are internally handled as
fixedsize entities.

Without the path, the internal brush used for that entity is moved back,
however not the light entity element itself. It turned out that due not
updating the undoId for that brush->owner entity, the undo operation did
not find the entity but re-created the one at the original position,
basically the entity was duplicated in the global entity list (but only
one had a proper brush reference though).

I'm not sure if the fix is really *that* simple so I'd like to get some
code comments first.

- Markus

More information about the Gtkradiant mailing list