aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-30 23:33:15 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-30 23:33:15 +0300
commit3ba50278808cb6f08a8abf7ec0c0ecdae9c472c5 (patch)
tree6cae29e3a16ea4cc9692b9464ea03a730256d1da /Software/Visual_Studio/SideChains
parent21804daa92a96d9ad4073e7f7ae117d889926831 (diff)
downloadTango-3ba50278808cb6f08a8abf7ec0c0ecdae9c472c5.tar.gz
Tango-3ba50278808cb6f08a8abf7ec0c0ecdae9c472c5.zip
Advanced bug reporting.
Diffstat (limited to 'Software/Visual_Studio/SideChains')
-rw-r--r--Software/Visual_Studio/SideChains/Tango.AutoComplete/Editors/AutoCompleteTextBox.cs43
1 files changed, 25 insertions, 18 deletions
diff --git a/Software/Visual_Studio/SideChains/Tango.AutoComplete/Editors/AutoCompleteTextBox.cs b/Software/Visual_Studio/SideChains/Tango.AutoComplete/Editors/AutoCompleteTextBox.cs
index 7ed4814d3..78e62d399 100644
--- a/Software/Visual_Studio/SideChains/Tango.AutoComplete/Editors/AutoCompleteTextBox.cs
+++ b/Software/Visual_Studio/SideChains/Tango.AutoComplete/Editors/AutoCompleteTextBox.cs
@@ -274,28 +274,33 @@ namespace Tango.AutoComplete.Editors
act = d as AutoCompleteTextBox;
if (act != null)
{
- if (act.Editor != null & !act._isUpdatingText)
- {
- act._isUpdatingText = true;
- act.Editor.Text = act.BindingEvaluator.Evaluate(e.NewValue);
- Keyboard.ClearFocus();
+ act.InvalidateSelection();
+ }
+ }
+
+ private void InvalidateSelection()
+ {
+ if (Editor != null & !_isUpdatingText)
+ {
+ _isUpdatingText = true;
+ Editor.Text = BindingEvaluator.Evaluate(SelectedItem);
+ Keyboard.ClearFocus();
- if (act._partSelectedContent != null)
+ if (_partSelectedContent != null)
+ {
+ if (SelectedItem == null)
{
- if (act.SelectedItem == null)
- {
- act._partSelectedContent.Visibility = Visibility.Collapsed;
- act.Editor.Foreground = Application.Current.Resources["FSE_PrimaryForegroundBrush"] as Brush;
- }
- else
- {
- act._partSelectedContent.Visibility = Visibility.Visible;
- act.Editor.Foreground = Brushes.Transparent;
- }
+ _partSelectedContent.Visibility = Visibility.Collapsed;
+ Editor.Foreground = Application.Current.Resources["FSE_PrimaryForegroundBrush"] as Brush;
+ }
+ else
+ {
+ _partSelectedContent.Visibility = Visibility.Visible;
+ Editor.Foreground = Brushes.Transparent;
}
-
- act._isUpdatingText = false;
}
+
+ _isUpdatingText = false;
}
}
@@ -350,6 +355,8 @@ namespace Tango.AutoComplete.Editors
}
_isUpdatingText = false;
+
+ InvalidateSelection();
}
private void ItemsSelector_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{