(Re)Build story page element list. */
| 91 | |
| 92 | /** (Re)Build story page element list. */ |
| 93 | void BuildStoryPageElementList() |
| 94 | { |
| 95 | if (this->story_page_elements.NeedRebuild()) { |
| 96 | this->story_page_elements.clear(); |
| 97 | |
| 98 | const StoryPage *p = GetSelPage(); |
| 99 | if (p != nullptr) { |
| 100 | for (const StoryPageElement *pe : StoryPageElement::Iterate()) { |
| 101 | if (pe->page == p->index) { |
| 102 | this->story_page_elements.push_back(pe); |
| 103 | } |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | this->story_page_elements.RebuildDone(); |
| 108 | } |
| 109 | |
| 110 | this->story_page_elements.Sort(); |
| 111 | this->InvalidateStoryPageElementLayout(); |
| 112 | } |
| 113 | |
| 114 | /** Sort story page elements by order value. */ |
| 115 | static bool PageElementOrderSorter(const StoryPageElement * const &a, const StoryPageElement * const &b) |
no test coverage detected