forked from teamnwah/openmw-tes3coop
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
|
void visitTopicName (TopicId topicId, boost::function <void (Utf8Span)> visitor) const
|
||||||
{
|
{
|
||||||
MWDialogue::Topic const & topic = * reinterpret_cast <MWDialogue::Topic const *> (topicId);
|
MWDialogue::Topic const & topic = * reinterpret_cast <MWDialogue::Topic const *> (topicId);
|
||||||
|
// This is to get the correct case for the topic
|
||||||
visitor (toUtf8Span (topic.getName ()));
|
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
|
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))
|
if (i->first [0] != std::tolower (character, mLocale))
|
||||||
continue;
|
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