Fix global map markers not being cleared on a new game

c++11
scrawl 10 years ago
parent 1cdb440b77
commit 72d0a69132

@ -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)

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

Loading…
Cancel
Save