mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 03:54:40 +00:00
Fix trade windows crashing after a new game
This commit is contained in:
parent
e32c73725c
commit
7eb1dcb682
@ -220,11 +220,13 @@ namespace MWGui
|
||||
|
||||
mDisposeCorpseButton->setVisible(loot);
|
||||
|
||||
setTitle(MWWorld::Class::get(container).getName(container));
|
||||
|
||||
mSortModel = new SortFilterItemModel(mModel);
|
||||
|
||||
mItemView->setModel (mSortModel);
|
||||
|
||||
// Careful here. setTitle may cause size updates, causing itemview redraw, so make sure to do it last
|
||||
// or we end up using a possibly invalid model.
|
||||
setTitle(MWWorld::Class::get(container).getName(container));
|
||||
}
|
||||
|
||||
void ContainerWindow::onCloseButtonClicked(MyGUI::Widget* _sender)
|
||||
|
@ -82,7 +82,6 @@ namespace MWGui
|
||||
void TradeWindow::startTrade(const MWWorld::Ptr& actor)
|
||||
{
|
||||
mPtr = actor;
|
||||
setTitle(MWWorld::Class::get(actor).getName(actor));
|
||||
|
||||
mCurrentBalance = 0;
|
||||
mCurrentMerchantOffer = 0;
|
||||
@ -99,6 +98,10 @@ namespace MWGui
|
||||
mItemView->setModel (mSortModel);
|
||||
|
||||
updateLabels();
|
||||
|
||||
// Careful here. setTitle may cause size updates, causing itemview redraw, so make sure to do it last
|
||||
// or we end up using a possibly invalid model.
|
||||
setTitle(MWWorld::Class::get(actor).getName(actor));
|
||||
}
|
||||
|
||||
void TradeWindow::onFilterChanged(MyGUI::Widget* _sender)
|
||||
|
Loading…
Reference in New Issue
Block a user