C2023-005: Search for annotations, delete causes reposition to first list item
C2023-004: Multiple tabs, closing one repositions to first rather than active
This commit is contained in:
@@ -939,11 +939,18 @@ namespace Volian.Controls.Library
|
||||
if (unitPrefix.EndsWith("#"))
|
||||
unitPrefix = unitPrefix.Replace("#", string.Empty);
|
||||
|
||||
// C2023-005: Lose list position after delete. Save selected index to restore after & don't open the
|
||||
// section after reset of index (UpdateAnnotationList setting below)
|
||||
int curindx = lbSrchResults.SelectedIndex;
|
||||
|
||||
SearchResults = ItemInfoList.GetListFromAnnotationSearch(DVISearchList, TypeSearchList, AnnotationSearchType, cbxTextSearchAnnotation.Text, cbxCaseSensitiveAnnoText.Checked, unitPrefix);
|
||||
|
||||
DisplayResults();
|
||||
UpdatedAnnotationList = true;
|
||||
lbSrchResults.SelectedIndex = curindx < 0 ? -1 : curindx - 1;
|
||||
UpdatedAnnotationList = false;
|
||||
}
|
||||
|
||||
private bool UpdatedAnnotationList = false;
|
||||
#endregion
|
||||
|
||||
#region (ContextMenu)
|
||||
@@ -1730,6 +1737,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (_LoadingList) return;
|
||||
if (_ProcessingSelectedValueChanged) return;
|
||||
if (UpdatedAnnotationList) return;
|
||||
_ProcessingSelectedValueChanged = true;
|
||||
// B2021-004: Prevent multiple selections on the Incoming Transitions listbox (disable selections
|
||||
// for the listbox until all processing is done, listbox is enabled at end of method)
|
||||
|
Reference in New Issue
Block a user