mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:23:54 +00:00
Merge pull request #2779 from Capostrophic/dialogue
Reset dialogue history when the window can't track what closed it
This commit is contained in:
commit
0364e0abc2
2 changed files with 4 additions and 5 deletions
|
@ -355,7 +355,6 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
if (exit())
|
if (exit())
|
||||||
{
|
{
|
||||||
resetHistory();
|
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -476,8 +475,9 @@ namespace MWGui
|
||||||
mDeleteLater.clear();
|
mDeleteLater.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueWindow::resetHistory()
|
void DialogueWindow::onClose()
|
||||||
{
|
{
|
||||||
|
// Reset history
|
||||||
for (DialogueText* text : mHistoryContents)
|
for (DialogueText* text : mHistoryContents)
|
||||||
delete text;
|
delete text;
|
||||||
mHistoryContents.clear();
|
mHistoryContents.clear();
|
||||||
|
@ -663,7 +663,6 @@ namespace MWGui
|
||||||
|
|
||||||
void DialogueWindow::onGoodbyeActivated()
|
void DialogueWindow::onGoodbyeActivated()
|
||||||
{
|
{
|
||||||
resetHistory();
|
|
||||||
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
|
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||||
resetReference();
|
resetReference();
|
||||||
|
@ -718,7 +717,6 @@ namespace MWGui
|
||||||
|
|
||||||
void DialogueWindow::onReferenceUnavailable()
|
void DialogueWindow::onReferenceUnavailable()
|
||||||
{
|
{
|
||||||
resetHistory();
|
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,6 +133,8 @@ namespace MWGui
|
||||||
|
|
||||||
void updateTopics();
|
void updateTopics();
|
||||||
|
|
||||||
|
void onClose();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateTopicsPane();
|
void updateTopicsPane();
|
||||||
bool isCompanion(const MWWorld::Ptr& actor);
|
bool isCompanion(const MWWorld::Ptr& actor);
|
||||||
|
@ -156,7 +158,6 @@ namespace MWGui
|
||||||
void updateDisposition();
|
void updateDisposition();
|
||||||
void restock();
|
void restock();
|
||||||
void deleteLater();
|
void deleteLater();
|
||||||
void resetHistory();
|
|
||||||
|
|
||||||
bool mIsCompanion;
|
bool mIsCompanion;
|
||||||
std::list<std::string> mKeywords;
|
std::list<std::string> mKeywords;
|
||||||
|
|
Loading…
Reference in a new issue