denemo-devel
[Top][All Lists]
Advanced

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

[Denemo-devel] Re: Delete destroys the selection


From: Richard Shann
Subject: [Denemo-devel] Re: Delete destroys the selection
Date: Thu, 13 May 2010 20:42:52 +0100

On Thu, 2010-05-13 at 21:37 +0200, Nils wrote:
> Hello,
> 
> is it needed that (d-DeleteObject) destroys the selection?
It is due no doubt to the representation of a selection inside denemo.
It is stored as begin-staff-number begin-measure-number
begin-object-number and the same for end, that is six numbers.
So if it did not destroy the selection it might after a delete no longer
refer to anything, and in many cases the selection would not refer to
the same thing even if nothing inside the selection was deleted.
I have an idea that the positions stored for PushPosition etc are
similar.
Giving objects unique IDs would be the way to go if you wanted to do
something else. Then you could seek the objects after delete etc. But
that would require a chunk of engineering on the C code...

Richard

>  I think the selection should stay intact after that. This is also useful for 
> scripts which use delete in them and work with selections.
> 
> Same with
> (d-DeleteMeasure)
> (d-DeleteMeasureAllStaffs)
> (d-DeletePreviousObject)
> 
> and probably other delete variants.
> 
> Nils




reply via email to

[Prev in Thread] Current Thread [Next in Thread]