View Single Post
Old 07-26-2014, 05:52 AM   #68
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,906
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by theducks View Post
David
I was reading in the Modify EPUB PI topic and something

Duplicate Selectors and changing their ORDER when sorting could have significant effects on the document.
I didn't think of that at all when I started. It was only after rereading one of the posts that I thought
Quote:
Maybe ?

1) Display a pre-sort warning if dups are found and:
a) allow a Bailout
b) just refuse to proceed.

2) Use a 'bubble sort' so the order does not change. I know, Bubble Sorts are slow.
I haven't thought about sort algorithms for a VERY long time. I'll have a think of these options.

In the meantime, I have added the single file sort that has been suggested. The toolbar button now has a menu option "Sort current file". When that is checked, pressing the button will sort the currently opened file if it is a stylesheet. If it is not checked, it will sort all of them as it does now.
Attached Files
File Type: zip SortCSS.zip (21.1 KB, 237 views)
davidfor is offline   Reply With Quote