From 6d90b6079e59b7ddae77417d60ea5df423e6fb27 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Sat, 22 Jan 2022 00:58:51 -0500 Subject: [PATCH] Implement vs grid settings command --- .../spark/AW2/ViewModel/VolSurfaceVM.cs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/client/spark/AW2/ViewModel/VolSurfaceVM.cs b/src/client/spark/AW2/ViewModel/VolSurfaceVM.cs index 8fb882741..c80bea57c 100644 --- a/src/client/spark/AW2/ViewModel/VolSurfaceVM.cs +++ b/src/client/spark/AW2/ViewModel/VolSurfaceVM.cs @@ -71,16 +71,18 @@ namespace mbts.spark { }); grid_settings_command = new DialogCommand(() => { var settings = _model.get_active_settings(); - if (settings == null) return null; - // return new VolSurfaceGridSettingsEditor { - // DataContext = new VolSurfaceGridSettingsEditorVM(settings.core_settings.vol_surface_name, erializationHelper.clone_protobuf(_grid_settings), - // new_settings => { - // _grid_settings = new_settings; - // _model.publish_grid_settings(_grid_settings); - // grid.update_column_filter(new HashSet(_grid_settings.hidden_cols())); - // }) - // }; - return null; + if (settings == null) { + return null; + } + return new VolSurfaceGridSettingsEditor { + DataContext = new VolSurfaceGridSettingsEditorVM( + settings.core_settings.vol_surface_name, ProtoBufSerializationHelper.clone_protobuf(_grid_settings), + new_settings => { + _grid_settings = new_settings; + _model.publish_grid_settings(_grid_settings); + grid.update_column_filter(new HashSet(_grid_settings.hidden_cols())); + }) + }; }); _model.on_dirty_change += raise_dirty_changed; macro_actions = new VolSurfaceMacroActionsVM(_model);