1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 06:00:45 +00:00

Version 4.1.0 Release

This commit is contained in:
hawkeye 2024-03-12 11:10:19 -04:00
parent 7a1e15169a
commit b0a6079800
2 changed files with 8 additions and 3 deletions

View file

@ -76,7 +76,6 @@ namespace MSFSPopoutPanelManager.MainApp.AppUserControl
foreach (var panelConfig in _viewModel.ActiveProfile.PanelConfigs) foreach (var panelConfig in _viewModel.ActiveProfile.PanelConfigs)
panelConfig.IsSelectedPanelSource = false; panelConfig.IsSelectedPanelSource = false;
_viewModel.DataItem.IsSelectedPanelSource = true;
_viewModel.EditPanelSourceCommand.Execute(); _viewModel.EditPanelSourceCommand.Execute();
} }
} }

View file

@ -3,6 +3,7 @@ using MSFSPopoutPanelManager.Orchestration;
using MSFSPopoutPanelManager.Shared; using MSFSPopoutPanelManager.Shared;
using Prism.Commands; using Prism.Commands;
using System; using System;
using System.Threading;
using System.Windows.Input; using System.Windows.Input;
namespace MSFSPopoutPanelManager.MainApp.ViewModel namespace MSFSPopoutPanelManager.MainApp.ViewModel
@ -47,10 +48,12 @@ namespace MSFSPopoutPanelManager.MainApp.ViewModel
private void OnAddPanelSourceLocation() private void OnAddPanelSourceLocation()
{ {
DataItem.IsEditingPanel = true; _panelSourceOrchestrator.ShowPanelSourceForEdit(DataItem); // This is to reset active panel source
FixedCameraConfigs.Clear(); FixedCameraConfigs.Clear();
FixedCameraConfigs.AddRange(_panelSourceOrchestrator.GetFixedCameraConfigs()); FixedCameraConfigs.AddRange(_panelSourceOrchestrator.GetFixedCameraConfigs());
DataItem.IsEditingPanel = true;
_panelSourceOrchestrator.StartPanelSelectionEvent(); _panelSourceOrchestrator.StartPanelSelectionEvent();
@ -64,11 +67,14 @@ namespace MSFSPopoutPanelManager.MainApp.ViewModel
private void OnEditPanelSource() private void OnEditPanelSource()
{ {
if (!DataItem.HasPanelSource)
return;
FixedCameraConfigs.Clear(); FixedCameraConfigs.Clear();
FixedCameraConfigs.AddRange(_panelSourceOrchestrator.GetFixedCameraConfigs()); FixedCameraConfigs.AddRange(_panelSourceOrchestrator.GetFixedCameraConfigs());
DataItem.IsSelectedPanelSource = true;
_panelSourceOrchestrator.ShowPanelSourceForEdit(DataItem); _panelSourceOrchestrator.ShowPanelSourceForEdit(DataItem);
} }
} }
} }