mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 04:43:21 +00:00
[RAPPS] Refreshing the Installed list should restore the selected item (#5676)
This commit is contained in:
parent
3b73d62eaa
commit
0e0f99744f
3 changed files with 52 additions and 0 deletions
|
@ -624,9 +624,14 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload, BOOL
|
|||
if (bCheckAvailable)
|
||||
CheckAvailable();
|
||||
|
||||
BOOL TryRestoreSelection = SelectedEnumType == EnumType;
|
||||
if (SelectedEnumType != EnumType)
|
||||
SelectedEnumType = EnumType;
|
||||
|
||||
CApplicationView::RESTORELISTSELECTION RestoreSelection;
|
||||
if (TryRestoreSelection)
|
||||
m_ApplicationView->GetRestoreListSelectionData(RestoreSelection);
|
||||
|
||||
if (bReload)
|
||||
m_Selected.RemoveAll();
|
||||
|
||||
|
@ -667,6 +672,9 @@ CMainWindow::UpdateApplicationsList(AppsCategories EnumType, BOOL bReload, BOOL
|
|||
{
|
||||
ATLASSERT(0 && "This should be unreachable!");
|
||||
}
|
||||
|
||||
if (TryRestoreSelection)
|
||||
m_ApplicationView->RestoreListSelection(RestoreSelection);
|
||||
m_ApplicationView->SetRedraw(TRUE);
|
||||
m_ApplicationView->RedrawWindow(0, 0, RDW_INVALIDATE | RDW_ALLCHILDREN); // force the child window to repaint
|
||||
UpdateStatusBarText();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue