View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0016229||Scribus||User Interface||public||2020-09-03 08:46||2020-09-16 12:46|
|Summary||0016229: refactor the document > sections dialog|
|Description||- [ ] remove the "to" column|
- [ ] remove the "shown" column
- [ ] replace it with type != None
- [ ] when reading a file and shown == false is found, set the format to "none"
(is it really needed? i guess that nobody has ever used that. for such cases, i think that we should put a "warning" at the end of the conversion and tell the user what he/she should check (instead of filling the import code with one more check for removed / deprecated features))
- [ ] only activate the add button if there is more than one page after the beginning of the last section
- [ ] automatically give a sane range to the new section (based on the current page?)
- [ ] rename the fields controlling the padding of the numbers (0016154)
- [ ] use a vector instead of a QMap for DocumentSectionMap
- [ ] use QMap::values() to iterate through the values
- [ ] use std::vector and range based loops
- [ ] use .at() instead of  to access the items
- [ ] use (and improve) the scribusdoc.cpp addSection(), ... function in ui/prefs_documentsections.cpp
- [ ] by default, leave the "name" empty (instead of filling it with the index.
- [ ] it's currently possible to define the section out of order (from mixed up): fix this when reading the document)
- [ ] make sure that the first section starts from the first page
- [ ] ensure it when reading a document
this is in preparation for accessing the sections from the scripter.
- [ ] Is "toIndex" still needed? useful?
- [ ] Shown says if the page number are shown: is it needed? is anybody using this? i guess that everybody is using different master pages for this.
- [ ] What happens if one deletes pages and a sections starts after the end of the document?
- [ ] What happens if one deletes pages and, suddenly, a page is in a different section?
- deleting pages, should change the section ranges? delete sections that suddenly have lost their pages?
-> section 1: 1 -5; section 2: 6 - 10; section 3: 11-15
-> if i delete the pages 4 to 12, should the section 2 be deleted and the ranges modified as
-> section 1: 1-4; section "3": 5 - 8
- ScribusDoc::addPageToSection() and removePageFromSection() seem to take care of it...
- [ ] How to behave for RTL documents? (we probably need a flag in the document creation)
- probably, keep the the UI as is but count from the end.
- [ ] is the sanity check in getSectionPageNumberWidthForPageIndex() really needed? i've checked the attached .sla and it indeed has an insane width. if a sanity check is needed, then in the sections dialog (and possibly when opening a file)
- [ ] currently a new section restarts the numbering at 1 and there is no way to have an automatic numbering that continues from the previous section. is there anything that can be done?
(as long as sections can only be used to distinguish between the numbering of the TOC and of the document, it's probably not a big issue)
- rename (and simplify) ScribusDoc::addSection() to initSections() since it's only called when the document is empty and can only have number set to 0 or -1
- getSectionNameForPageIndex() was unused
- ScribusDoc::removePageFromSection() was removing a section while iterating through the list of sections...
"bugs" found in the current implementation:
- when you create a new section, you get a warning that the range is wrong
- a page can be in multiple sections
- a page can be in no section
- sections can be out of order
the question is if those behaviors are sane, used, and should be fixed when opening an old file...
|Tags||No tags attached.|
||afaik 'shown' is redundant anyway, as unchecking it does the same as selecting 'none' in the 'style' column.|
||good catch, utnik. i will then remove "shown"... and try to find out why the page numbering format is inserted twice...|
|2020-09-03 08:46||ale||New Issue|
|2020-09-03 08:46||ale||Description Updated|
|2020-09-03 08:55||ale||Description Updated|
|2020-09-03 09:49||ale||Description Updated|
|2020-09-03 10:02||ale||Description Updated|
|2020-09-03 10:18||ale||Description Updated|
|2020-09-03 10:25||utnik||Note Added: 0048024|
|2020-09-03 11:51||ale||Description Updated|
|2020-09-03 11:54||ale||Note Added: 0048026|
|2020-09-03 11:59||ale||Description Updated|
|2020-09-03 12:24||ale||Description Updated|
|2020-09-03 12:34||ale||Description Updated|
|2020-09-03 12:34||ale||Description Updated|
|2020-09-03 12:42||ale||Description Updated|
|2020-09-03 12:44||ale||Description Updated|
|2020-09-03 12:56||ale||Description Updated|
|2020-09-03 13:10||ale||Description Updated|
|2020-09-03 13:38||ale||Description Updated|
|2020-09-03 13:57||ale||Description Updated|
|2020-09-03 15:02||ale||Description Updated|
|2020-09-03 15:20||ale||Description Updated|
|2020-09-03 15:28||ale||Description Updated|
|2020-09-04 06:56||ale||Description Updated|
|2020-09-16 12:46||ale||Description Updated|