mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
Retrieve the correct case for topics in the journal
This commit is contained in:
parent
1f58edb9db
commit
0bb51fd91d
1 changed files with 7 additions and 3 deletions
|
@ -361,8 +361,9 @@ struct MWGui::JournalViewModelImpl : JournalViewModel
|
|||
void visitTopicName (TopicId topicId, boost::function <void (Utf8Span)> visitor) const
|
||||
{
|
||||
MWDialogue::Topic const & topic = * reinterpret_cast <MWDialogue::Topic const *> (topicId);
|
||||
|
||||
visitor (toUtf8Span (topic.getName ()));
|
||||
// This is to get the correct case for the topic
|
||||
const std::string& name = MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>().find(topic.getName())->mId;
|
||||
visitor (toUtf8Span (name));
|
||||
}
|
||||
|
||||
void visitTopicNamesStartingWith (char character, boost::function < void (TopicId , Utf8Span) > visitor) const
|
||||
|
@ -374,7 +375,10 @@ struct MWGui::JournalViewModelImpl : JournalViewModel
|
|||
if (i->first [0] != std::tolower (character, mLocale))
|
||||
continue;
|
||||
|
||||
visitor (TopicId (&i->second), toUtf8Span (i->first));
|
||||
// This is to get the correct case for the topic
|
||||
const std::string& name = MWBase::Environment::get().getWorld()->getStore().get<ESM::Dialogue>().find(i->first)->mId;
|
||||
|
||||
visitor (TopicId (&i->second), toUtf8Span (name));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue