mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Rendering - Moved bitmap management logic & prevent access violations
This commit is contained in:
1 parent
1a7a7e0582
commit
456af693b0
11 files changed
+310
-322
No files matched your search
@@ -245,7 +245,8 @@ namespace Artemis.UI.Shared
|
||||
|
||||
private void PopupOpened()
|
||||
{
|
||||
RecentColorsContainer.ItemsSource = new ObservableCollection<Color>(_colorPickerService.RecentColors);
|
||||
if (_colorPickerService != null)
|
||||
RecentColorsContainer.ItemsSource = new ObservableCollection<Color>(_colorPickerService.RecentColors);
|
||||
}
|
||||
|
||||
private void SelectRecentColor(object sender, MouseButtonEventArgs e)
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Artemis.UI.Shared.Input
|
||||
private DataModelPath? _dataModelPath;
|
||||
private DataModelPropertiesViewModel? _dataModelViewModel;
|
||||
private bool _displaySwitchButton;
|
||||
private Type[] _filterTypes = new Type[0];
|
||||
private Type[] _filterTypes = Array.Empty<Type>();
|
||||
private bool _isDataModelViewModelOpen;
|
||||
private bool _isEnabled = true;
|
||||
private string _placeholder = "Select a property";
|
||||
@@ -143,7 +143,8 @@ namespace Artemis.UI.Shared.Input
|
||||
if (value)
|
||||
{
|
||||
UpdateDataModelVisualization();
|
||||
OpenSelectedValue(DataModelViewModel);
|
||||
if (DataModelViewModel != null)
|
||||
OpenSelectedValue(DataModelViewModel);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -242,7 +243,7 @@ namespace Artemis.UI.Shared.Input
|
||||
|
||||
private void ExecuteSelectPropertyCommand(object? context)
|
||||
{
|
||||
if (!(context is DataModelVisualizationViewModel selected))
|
||||
if (context is not DataModelVisualizationViewModel selected)
|
||||
return;
|
||||
|
||||
ChangeDataModelPath(selected.DataModelPath);
|
||||
|
||||
Reference in new issue
Block a user