summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/NewStory/src/history_array.cpp9
-rw-r--r--plugins/NewStory/src/history_array.h1
-rw-r--r--plugins/NewStory/src/history_control.cpp2
3 files changed, 3 insertions, 9 deletions
diff --git a/plugins/NewStory/src/history_array.cpp b/plugins/NewStory/src/history_array.cpp
index b7244c283d..6a88558640 100644
--- a/plugins/NewStory/src/history_array.cpp
+++ b/plugins/NewStory/src/history_array.cpp
@@ -191,7 +191,8 @@ ItemData* ItemData::checkPrevGC(ItemData *pPrev)
int ItemData::calcHeight(int top, int width, POINT *pPos)
{
- checkCreate();
+ if (m_doc == nullptr)
+ setText();
SIZE sz;
sz.cx = width - 2;
@@ -227,12 +228,6 @@ int ItemData::calcHeight(int top, int width, POINT *pPos)
return savedHeight;
}
-void ItemData::checkCreate()
-{
- if (m_doc == nullptr)
- setText();
-}
-
bool ItemData::fetch(void)
{
// if this event is virtual (for example, in group chats), don't try to laod it
diff --git a/plugins/NewStory/src/history_array.h b/plugins/NewStory/src/history_array.h
index a03e8b4066..b94a38888e 100644
--- a/plugins/NewStory/src/history_array.h
+++ b/plugins/NewStory/src/history_array.h
@@ -34,7 +34,6 @@ struct ItemData
ItemData* checkNext(ItemData *pPrev);
ItemData* checkPrev(ItemData *pPrev);
ItemData* checkPrevGC(ItemData *pPrev);
- void checkCreate();
int calcHeight(int top, int width, POINT *pPos = nullptr);
bool completed() const { return m_bOfflineDownloaded == 100; }
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 3ccad39066..6cbc484733 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -442,7 +442,7 @@ void NewstoryListData::EndEditItem(bool bAccept)
pItem->m_doc = 0;
pItem->savedHeight = -1;
- pItem->checkCreate();
+ pItem->setText();
}
}