summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/history_array.cpp5
-rw-r--r--plugins/NewStory/src/history_control.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp
index 5ffc175cff..b5d03d0b23 100644
--- a/plugins/NewStory/src/history_array.cpp
+++ b/plugins/NewStory/src/history_array.cpp
@@ -193,7 +193,10 @@ ItemData* HistoryArray::get(int id, ItemData::EventLoadMode mode)
if (pageNo >= pages.getCount())
return nullptr;
- return &pages[pageNo].data[id % HIST_BLOCK_SIZE];
+ auto *p = &pages[pageNo].data[id % HIST_BLOCK_SIZE];
+ if (mode != ItemData::ELM_NOTHING)
+ p->load(mode);
+ return p;
}
int HistoryArray::getCount() const
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index e843906dff..7afb4d0556 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -273,7 +273,8 @@ static int LayoutItem(HWND hwnd, HistoryArray *items, int index)
int width = rc.right - rc.left;
ItemData *item = items->get(index, ItemData::ELM_DATA);
- if (!item) return 0;
+ if (!item)
+ return 0;
int tpl;
int fontid;