diff options
author | Matt Ward <matt.ward@xamarin.com> | 2015-06-26 17:54:42 +0300 |
---|---|---|
committer | Matt Ward <matt.ward@xamarin.com> | 2015-06-26 18:02:22 +0300 |
commit | 31a116705fda44529666abdcbf12bfbf62633341 (patch) | |
tree | c2c35cc517faba5e1e59d8ed9ec99f20ef77630f /main/src/addins/WindowsPlatform | |
parent | d34ae03547d15e9eaef9e717f7a504cc8d449bcf (diff) |
[Windows] Fix ArgumentOutOfRangeException in Choose encodings window.
Fixed bug #31402 - Crash when click 'Drown/Up' button multiple times
in "Choose encodings" window.
https://bugzilla.xamarin.com/show_bug.cgi?id=31402
To repro:
1. Click on File >> Open option.
2. Select "Add or Remove" option from Encoding field.
3. Open Choose encoding window.
4. Select any item not at the end of the "Encoding shown in menu" list
5. Click on "Drown/Up" button multiple times.
Then an ArgumentOutOfRangeException was thrown.
The problem was that the up/down buttons in the Choose encodings
window were not being disabled after they were clicked when the item
currently selected had moved to the top or bottom of the list.
Diffstat (limited to 'main/src/addins/WindowsPlatform')
-rw-r--r-- | main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectEncodingControl.xaml.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectEncodingControl.xaml.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectEncodingControl.xaml.cs index 8420545630..7a0a17c6dc 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectEncodingControl.xaml.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/Dialogs/SelectEncodingControl.xaml.cs @@ -49,11 +49,13 @@ namespace MonoDevelop.Platform void btnDown_Click (object sender, RoutedEventArgs e)
{
ShownEncodings.Move (shownLst.SelectedIndex, shownLst.SelectedIndex + 1);
+ UpdateButtons ();
}
void btnUp_Click (object sender, RoutedEventArgs e)
{
ShownEncodings.Move (shownLst.SelectedIndex, shownLst.SelectedIndex - 1);
+ UpdateButtons ();
}
void btnRight_Click (object sender, RoutedEventArgs e)
|