persistent selections

Casper Boemann cbr at boemann.dk
Thu Apr 28 14:04:43 CEST 2005


This is a heads up for an upcoming change.

I have implemented persistent selections in my private repository:
  - there is always a KisSelection (though created on first reference) and it never changes only its contents
  - implemented "deselect" as setting hasSelection = false
  - implemented "reselect" as setting hasSelection=true
  - calling paintdev->selection() sets hasSelection=true and also creates the KisSelection the first time it's called
  - removeSelection() and setSelection() has gone, but partly replaced by deselect()
  - "select all" is like any other kind of selecting
  - "invert" inverts entire selection not just the extent of already selected.

Not yet implemented is:
  - if deselected when selecting then clear selection first. Otherwise add to selection
  - selectedRect() return extent of selection unioned with the extent of the parent paintdev if defaultpixel of selection != 0
  - "select all" should use clear and defaultPixel, but that requires that selectedRect works.

Finally something to think about:
When infinity has been selected (as selecting a little rect and then choosing invert). How do we convey this to every "user" of selection. I have proposed changing selectedRect to take the parent paintDev into account, but could we think of cases where this doesn't hold. And if so what should we do?

best regards / venlig hilsen
Casper Boemann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kimageshop/attachments/20050428/fd3c6f76/attachment.html


More information about the kimageshop mailing list