mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Display conditions - Fixed event argument conditions
Display conditions - Fixed event inner-condition selection
This commit is contained in:
1 parent
f179980ac4
commit
13df88ca40
5 files changed
+30
-10
No files matched your search
@@ -97,7 +97,11 @@ namespace Artemis.UI.Shared.Input
|
||||
public bool IsDataModelViewModelOpen
|
||||
{
|
||||
get => _isDataModelViewModelOpen;
|
||||
set => SetAndNotify(ref _isDataModelViewModelOpen, value);
|
||||
set
|
||||
{
|
||||
if (!SetAndNotify(ref _isDataModelViewModelOpen, value)) return;
|
||||
if (value) UpdateDataModelVisualization();
|
||||
}
|
||||
}
|
||||
|
||||
public DataModelPath DataModelPath
|
||||
@@ -195,9 +199,14 @@ namespace Artemis.UI.Shared.Input
|
||||
|
||||
private void OnUpdateTimerOnElapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
if (!IsDataModelViewModelOpen)
|
||||
return;
|
||||
// if (!IsDataModelViewModelOpen)
|
||||
// return;
|
||||
//
|
||||
// UpdateDataModelVisualization();
|
||||
}
|
||||
|
||||
private void UpdateDataModelVisualization()
|
||||
{
|
||||
DataModelViewModel.Update(_dataModelUIService);
|
||||
foreach (DataModelPropertiesViewModel extraDataModelViewModel in ExtraDataModelViewModels)
|
||||
extraDataModelViewModel.Update(_dataModelUIService);
|
||||
|
||||
+3
-6
@@ -184,14 +184,11 @@ namespace Artemis.UI.Shared
|
||||
|
||||
internal void PopulateProperties(IDataModelUIService dataModelUIService)
|
||||
{
|
||||
// if (IsRootViewModel)
|
||||
// return;
|
||||
|
||||
if (Parent == null && DataModel == null)
|
||||
if (IsRootViewModel && DataModel == null)
|
||||
return;
|
||||
|
||||
Type modelType = Parent == null || Parent.IsRootViewModel ? DataModel.GetType() : DataModelPath.GetPropertyType();
|
||||
|
||||
Type modelType = IsRootViewModel ? DataModel.GetType() : DataModelPath?.GetPropertyType() ?? DataModel.GetType();
|
||||
|
||||
// Add missing static children
|
||||
foreach (PropertyInfo propertyInfo in modelType.GetProperties(BindingFlags.Public | BindingFlags.Instance).OrderBy(t => t.MetadataToken))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user