From 9bb70257528890fbc28cebfdd6a298152b36f061 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Mon, 22 Aug 2022 15:50:10 -0400 Subject: [PATCH] fix: Don't share nonfrozen Brushes across threads Bugs (fixed): * Grid settings dialogs crash when multiple are opened on diff threads Cause: Brushes (and all Freezables) that haven't been frozen throw an ex when any Dependency Properties are accessed from a thread that isn't associated with their Dispatcher (i.e., the thread on which they were created). --- .../ColorPicker/ColorPickerPopupWithOpacitySlider.xaml | 6 ++++++ .../DIYGrid/Settings/Animation/CellAnimationView.xaml | 6 ++++++ .../DIYGrid/Settings/Animation/RowAnimationView.xaml | 6 ++++++ src/client/spark/view/Resources/Converters.xaml | 3 --- .../spark/view/Settings/NotificationSettingsView.xaml | 3 +++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/client/spark/view/Controls/ColorPicker/ColorPickerPopupWithOpacitySlider.xaml b/src/client/spark/view/Controls/ColorPicker/ColorPickerPopupWithOpacitySlider.xaml index e927d9226..fe49af51c 100644 --- a/src/client/spark/view/Controls/ColorPicker/ColorPickerPopupWithOpacitySlider.xaml +++ b/src/client/spark/view/Controls/ColorPicker/ColorPickerPopupWithOpacitySlider.xaml @@ -7,6 +7,12 @@ xmlns:c="clr-namespace:mbts.ui.controls" xmlns:cv="clr-namespace:mbts.ui.converters" > + + + + + + @@ -16,6 +17,11 @@ 3.0 8.0 4.0 + + + + + diff --git a/src/client/spark/view/Controls/DIYGrid/Settings/Animation/RowAnimationView.xaml b/src/client/spark/view/Controls/DIYGrid/Settings/Animation/RowAnimationView.xaml index 6861fe825..db7a84abc 100644 --- a/src/client/spark/view/Controls/DIYGrid/Settings/Animation/RowAnimationView.xaml +++ b/src/client/spark/view/Controls/DIYGrid/Settings/Animation/RowAnimationView.xaml @@ -3,6 +3,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:u="clr-namespace:mbts.ui" xmlns:c="clr-namespace:mbts.ui.controls" + xmlns:cv="clr-namespace:mbts.ui.converters" xmlns:sys="clr-namespace:System;assembly=mscorlib" > @@ -16,6 +17,11 @@ 3.0 8.0 4.0 + + + + + diff --git a/src/client/spark/view/Resources/Converters.xaml b/src/client/spark/view/Resources/Converters.xaml index 7620c2e66..24573a137 100644 --- a/src/client/spark/view/Resources/Converters.xaml +++ b/src/client/spark/view/Resources/Converters.xaml @@ -68,9 +68,6 @@ - - - diff --git a/src/client/spark/view/Settings/NotificationSettingsView.xaml b/src/client/spark/view/Settings/NotificationSettingsView.xaml index 6026f7675..2ee95c41b 100644 --- a/src/client/spark/view/Settings/NotificationSettingsView.xaml +++ b/src/client/spark/view/Settings/NotificationSettingsView.xaml @@ -25,6 +25,9 @@ + + +