Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rampaa committed Oct 20, 2023
1 parent bf6c82c commit d1c8a91
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions JL.Windows/GUI/PopupWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1224,9 +1224,11 @@ private async void PrimarySpelling_PreviewMouseUp(object sender, MouseButtonEven
return;
}

string? selectedDefinitions = GetSelectedDefinitions(_listViewItemIndex);

HidePopup();

await PopupWindowUtils.Mine(LastLookupResults[_listViewItemIndex], _currentText, GetSelectedDefinitions(_listViewItemIndex), _currentCharPosition).ConfigureAwait(false);
await PopupWindowUtils.Mine(LastLookupResults[_listViewItemIndex], _currentText, selectedDefinitions, _currentCharPosition).ConfigureAwait(false);
}

private void ShowAddNameWindow()
Expand Down Expand Up @@ -1602,10 +1604,12 @@ public async Task HandleHotKey(KeyGesture keyGesture)
{
if (MiningMode && PopupListView.SelectedItem is not null)
{
int index = GetIndexOfListViewItemFromStackPanel((StackPanel)PopupListView.SelectedItem);
string? selectedDefinitions = GetSelectedDefinitions(index);

HidePopup();

int index = GetIndexOfListViewItemFromStackPanel((StackPanel)PopupListView.SelectedItem);
await PopupWindowUtils.Mine(LastLookupResults[index], _currentText, GetSelectedDefinitions(index), _currentCharPosition).ConfigureAwait(false);
await PopupWindowUtils.Mine(LastLookupResults[index], _currentText, selectedDefinitions, _currentCharPosition).ConfigureAwait(false);
}
}
}
Expand Down

0 comments on commit d1c8a91

Please sign in to comment.