Skip to content

Commit aa84b09

Browse files
committed
update: XYZ AxisLength and OpenSettings state
- Changed default `AxisLength` in `SolidVisualizationSettings` from 6 to 2. - Control `OpenSettings` command execution state
1 parent d019257 commit aa84b09

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

source/RevitDevTool/Models/Config/RenderConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public sealed class SolidVisualizationSettings
9898
public class XyzVisualizationSettings
9999
{
100100
[JsonPropertyName("Transparency")] public double Transparency { get; set; }
101-
[JsonPropertyName("AxisLength")] public double AxisLength { get; set; } = 6;
101+
[JsonPropertyName("AxisLength")] public double AxisLength { get; set; } = 2;
102102
[JsonPropertyName("MinAxisLength")] public double MinAxisLength { get; set; } = 0.1;
103103

104104
[JsonPropertyName("XColor")] public Color XColor { get; set; } = Color.FromArgb(255, 238, 65 , 54);

source/RevitDevTool/ViewModel/TraceLogViewModel.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ private static bool IsDarkTheme
3434
get => ThemeWatcher.GetRequiredTheme() == ApplicationTheme.Dark ;
3535
}
3636

37+
[ObservableProperty] [NotifyCanExecuteChangedFor(nameof(OpenSettingsCommand))] private bool _isSettingOpened;
3738
[ObservableProperty] private bool _isStarted = true;
3839
[ObservableProperty] private LogEventLevel _logLevel = LogEventLevel.Debug;
3940

@@ -169,15 +170,19 @@ private static void ClearGeometry()
169170
VisualizationController.Clear();
170171
}
171172

172-
[RelayCommand]
173-
private static void OpenSettings()
173+
[RelayCommand(CanExecute = nameof(CanOpenSettings))]
174+
private void OpenSettings()
174175
{
175176
var settingsWindow = new View.SettingsView();
176177
settingsWindow.SetAutodeskOwner();
177178
settingsWindow.Show();
178179
settingsWindow.NavigationService.Navigate(typeof(GeneralSettingsView));
180+
IsSettingOpened = true;
181+
settingsWindow.Closed += (_, _) => { IsSettingOpened = false ; };
179182
}
180183

184+
private bool CanOpenSettings() => !IsSettingOpened;
185+
181186
public void RefreshTheme()
182187
{
183188
ApplyLogTheme();

0 commit comments

Comments
 (0)