Re: [Planner Dev] Bugs in the undo system: Report to reach 0.12



Hi!

El jue, 24-06-2004 a las 08:45, lincoln phipps openmutual net escribió:
> > 
> > Hmmm, the duplicate 
> > 
> > http://bugs.gnome.org/show_bug.cgi?id=142216
> > 
> > is more informative and now I know the problem. I will try to look at it
> > and work with you Lincoln, to solve it.
> 
> 
> Yes, as I discovered there are three type of properties,
> 
> Project, Task, Resource.  This is why I created the
> structure of MrpPropertyStore so we could store the
> ownertype (project/task/resource) and the actual store
> pointer.
> 
> Project has no problems as you've found out - its the
> resource and task thats the problem.
> 
> The actual task and resource property get deleted
> and resoured but the resource view (or task view)
> gets one of three signals,
> 
> property-removed,
> property-added,
> property-changed,
> 
> The changed is easy - it simply updates the column label
> and this works OK.
> 
> The removed and added is harder as in the view all it does
> is add/drop the hash of the column from a hash table and
> add/drop the column in the view.
> 
> I can envisage a patch that hooks the property-removed
> and my plan was to before the current hash table and
> column actions were done create a undo/redo cmd entry
> that stored the column data and store those in a table
> of GValues. But I couldn't work out how to get all the
> column data.


Hmmm, what I am doing is when you remove a property, save all data from
this property (GValues) to a hash table. In the hash table I use the
MrpTask o MrpResource as the key and the data is the GValue for the
property. If you undo the property removal then you add the property
another time and set all the tasks or resources to the GValues they had.

Do you find some prob with this approach? I am very near to finish it
adn we can test it.


Cheers

-- Alvaro

> 
> Then on UNDO (the undo label would say "Restore Property Values")
> I would undo that and then call the undo again to undo
> the property (I guess we can do that ?).
> 
> Well tat was my plan though it was trying to work out how
> to get the column data that was bugging me and I've
> stopped there.
> 
> Rgds,
> Lincoln.
> > 
> > Cheers
> > 
> > -- Alvaro
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > Planner-dev mailing list
> > Planner-dev lists imendio com
> > http://lists.imendio.com/mailman/listinfo/planner-dev
> _______________________________________________
> Planner-dev mailing list
> Planner-dev lists imendio com
> http://lists.imendio.com/mailman/listinfo/planner-dev

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]