1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-20 06:53:52 +00:00

Fix global map markers not being cleared on a new game

This commit is contained in:
scrawl 2015-05-28 18:44:34 +02:00
parent 1cdb440b77
commit 72d0a69132
2 changed files with 6 additions and 2 deletions

View file

@ -782,6 +782,7 @@ namespace MWGui
markerWidget->setDepth(Global_MarkerLayer);
markerWidget->eventMouseDrag += MyGUI::newDelegate(this, &MapWindow::onMouseDrag);
markerWidget->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart);
mGlobalMapMarkers.push_back(markerWidget);
}
}
@ -899,8 +900,9 @@ namespace MWGui
mGlobalMapRender->clear();
mChanged = true;
while (mEventBoxGlobal->getChildCount())
MyGUI::Gui::getInstance().destroyWidget(mEventBoxGlobal->getChildAt(0));
for (std::vector<MyGUI::Widget*>::iterator it = mGlobalMapMarkers.begin(); it != mGlobalMapMarkers.end(); ++it)
MyGUI::Gui::getInstance().destroyWidget(*it);
mGlobalMapMarkers.clear();
}
void MapWindow::write(ESM::ESMWriter &writer, Loading::Listener& progress)

View file

@ -236,6 +236,8 @@ namespace MWGui
MWRender::GlobalMap* mGlobalMapRender;
std::vector<MyGUI::Widget*> mGlobalMapMarkers;
EditNoteDialog mEditNoteDialog;
ESM::CustomMarker mEditingMarker;