mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:53:52 +00:00
Only clear dialogue history if the dialogue window is closed (bug #5358)
This commit is contained in:
parent
b42d097739
commit
9dbdbbaea7
3 changed files with 15 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
||||||
0.47.0
|
0.47.0
|
||||||
------
|
------
|
||||||
|
|
||||||
|
Bug #5358: ForceGreeting always resets the dialogue window completely
|
||||||
|
|
||||||
0.46.0
|
0.46.0
|
||||||
------
|
------
|
||||||
|
|
|
@ -354,7 +354,10 @@ namespace MWGui
|
||||||
void DialogueWindow::onByeClicked(MyGUI::Widget* _sender)
|
void DialogueWindow::onByeClicked(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
if (exit())
|
if (exit())
|
||||||
|
{
|
||||||
|
resetHistory();
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogueWindow::onSelectListItem(const std::string& topic, int id)
|
void DialogueWindow::onSelectListItem(const std::string& topic, int id)
|
||||||
|
@ -418,9 +421,7 @@ namespace MWGui
|
||||||
bool sameActor = (mPtr == actor);
|
bool sameActor = (mPtr == actor);
|
||||||
if (!sameActor)
|
if (!sameActor)
|
||||||
{
|
{
|
||||||
for (DialogueText* text : mHistoryContents)
|
// The history is not reset here
|
||||||
delete text;
|
|
||||||
mHistoryContents.clear();
|
|
||||||
mKeywords.clear();
|
mKeywords.clear();
|
||||||
mTopicsList->clear();
|
mTopicsList->clear();
|
||||||
for (Link* link : mLinks)
|
for (Link* link : mLinks)
|
||||||
|
@ -475,6 +476,13 @@ namespace MWGui
|
||||||
mDeleteLater.clear();
|
mDeleteLater.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DialogueWindow::resetHistory()
|
||||||
|
{
|
||||||
|
for (DialogueText* text : mHistoryContents)
|
||||||
|
delete text;
|
||||||
|
mHistoryContents.clear();
|
||||||
|
}
|
||||||
|
|
||||||
void DialogueWindow::setKeywords(std::list<std::string> keyWords)
|
void DialogueWindow::setKeywords(std::list<std::string> keyWords)
|
||||||
{
|
{
|
||||||
if (mKeywords == keyWords && isCompanion() == mIsCompanion)
|
if (mKeywords == keyWords && isCompanion() == mIsCompanion)
|
||||||
|
@ -655,6 +663,7 @@ 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();
|
||||||
|
@ -709,6 +718,7 @@ namespace MWGui
|
||||||
|
|
||||||
void DialogueWindow::onReferenceUnavailable()
|
void DialogueWindow::onReferenceUnavailable()
|
||||||
{
|
{
|
||||||
|
resetHistory();
|
||||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,6 +156,7 @@ 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