[Gtkradiant] Patch undo bug in 1.4/1.6 with entities (e.g. light)
ttimo at idsoftware.com
Thu Jan 7 21:03:30 CST 2010
Markus Fischer wrote:
> 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
Applied. Rambetter's own testing seemed adequate enough.
I think you overestimate how much I remember from this source code. I
don't really have a better way than anyone else to assess the safety of
a patch like that nowadays.
More information about the Gtkradiant