mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-12 13:13:27 +00:00
Merge pull request #2773 from Capostrophic/dialogue
Only clear dialogue history if the dialogue window is closed (bug #5358)
This commit is contained in:
commit
5df6646b06
@ -1,6 +1,7 @@
|
||||
0.47.0
|
||||
------
|
||||
|
||||
Bug #5358: ForceGreeting always resets the dialogue window completely
|
||||
Bug #5364: Script fails/stops if trying to startscript an unknown script
|
||||
Bug #5367: Selecting a spell on an enchanted item per hotkey always plays the equip sound
|
||||
Bug #5369: Spawnpoint in the Grazelands doesn't produce oversized creatures
|
||||
|
@ -354,7 +354,10 @@ namespace MWGui
|
||||
void DialogueWindow::onByeClicked(MyGUI::Widget* _sender)
|
||||
{
|
||||
if (exit())
|
||||
{
|
||||
resetHistory();
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
||||
}
|
||||
}
|
||||
|
||||
void DialogueWindow::onSelectListItem(const std::string& topic, int id)
|
||||
@ -418,9 +421,7 @@ namespace MWGui
|
||||
bool sameActor = (mPtr == actor);
|
||||
if (!sameActor)
|
||||
{
|
||||
for (DialogueText* text : mHistoryContents)
|
||||
delete text;
|
||||
mHistoryContents.clear();
|
||||
// The history is not reset here
|
||||
mKeywords.clear();
|
||||
mTopicsList->clear();
|
||||
for (Link* link : mLinks)
|
||||
@ -475,6 +476,13 @@ namespace MWGui
|
||||
mDeleteLater.clear();
|
||||
}
|
||||
|
||||
void DialogueWindow::resetHistory()
|
||||
{
|
||||
for (DialogueText* text : mHistoryContents)
|
||||
delete text;
|
||||
mHistoryContents.clear();
|
||||
}
|
||||
|
||||
void DialogueWindow::setKeywords(std::list<std::string> keyWords)
|
||||
{
|
||||
if (mKeywords == keyWords && isCompanion() == mIsCompanion)
|
||||
@ -655,6 +663,7 @@ namespace MWGui
|
||||
|
||||
void DialogueWindow::onGoodbyeActivated()
|
||||
{
|
||||
resetHistory();
|
||||
MWBase::Environment::get().getDialogueManager()->goodbyeSelected();
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(MWGui::GM_Dialogue);
|
||||
resetReference();
|
||||
@ -709,6 +718,7 @@ namespace MWGui
|
||||
|
||||
void DialogueWindow::onReferenceUnavailable()
|
||||
{
|
||||
resetHistory();
|
||||
MWBase::Environment::get().getWindowManager()->removeGuiMode(GM_Dialogue);
|
||||
}
|
||||
|
||||
|
@ -156,6 +156,7 @@ namespace MWGui
|
||||
void updateDisposition();
|
||||
void restock();
|
||||
void deleteLater();
|
||||
void resetHistory();
|
||||
|
||||
bool mIsCompanion;
|
||||
std::list<std::string> mKeywords;
|
||||
|
Loading…
x
Reference in New Issue
Block a user