mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-24 16:51:52 +01:00
Fix more UI asserts (#146)
This commit is contained in:
parent
86e1a2227c
commit
b1e92f1779
@ -243,7 +243,8 @@ void wxGameList::SetStyle(Style style, bool save)
|
||||
g_config.Save();
|
||||
}
|
||||
|
||||
ApplyGameListColumnWidths();
|
||||
if (style == Style::kList)
|
||||
ApplyGameListColumnWidths();
|
||||
}
|
||||
|
||||
long wxGameList::GetStyleFlags(Style style) const
|
||||
|
@ -73,7 +73,8 @@ void SymbolListCtrl::OnGameLoaded()
|
||||
rplSymbolStorage_unlockSymbolMap();
|
||||
|
||||
SetItemCount(m_data.size());
|
||||
RefreshItems(GetTopItem(), GetTopItem() + GetCountPerPage() + 1);
|
||||
if (m_data.size() > 0)
|
||||
RefreshItems(GetTopItem(), std::min<long>(m_data.size() - 1, GetTopItem() + GetCountPerPage() + 1));
|
||||
}
|
||||
|
||||
wxString SymbolListCtrl::OnGetItemText(long item, long column) const
|
||||
@ -159,5 +160,6 @@ void SymbolListCtrl::ChangeListFilter(std::string filter)
|
||||
}
|
||||
}
|
||||
SetItemCount(visible_entries);
|
||||
RefreshItems(GetTopItem(), GetTopItem() + GetCountPerPage() + 1);
|
||||
if (visible_entries > 0)
|
||||
RefreshItems(GetTopItem(), std::min<long>(visible_entries - 1, GetTopItem() + GetCountPerPage() + 1));
|
||||
}
|
@ -372,7 +372,9 @@ void TextureRelationViewerWindow::RefreshTextureList()
|
||||
}
|
||||
}
|
||||
textureRelationListA->Thaw();
|
||||
textureRelationListA->EnsureVisible(scrollPos + textureRelationListA->GetCountPerPage() - 1);
|
||||
long itemCount = textureRelationListA->GetItemCount();
|
||||
if (itemCount > 0)
|
||||
textureRelationListA->EnsureVisible(std::min<long>(itemCount - 1, scrollPos + textureRelationListA->GetCountPerPage() - 1));
|
||||
}
|
||||
|
||||
void TextureRelationViewerWindow::OnTextureListRightClick(wxMouseEvent& event)
|
||||
@ -383,4 +385,4 @@ void TextureRelationViewerWindow::OnTextureListRightClick(wxMouseEvent& event)
|
||||
void TextureRelationViewerWindow::Close()
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user