'새 서식'을 없앤다 — 코드 없는 문서는 그린 뒤에 저장이 막힌다
서식은 항상 목록에서 골라 연다는 결정. ## 없앤 진입점 넷 - 파일 메뉴 '새 서식(N)' - Ctrl+N - 탭 흐름 옆 '+' 버튼(DesignerTheme.xaml) - 빈 화면의 '새 서식' 버튼 시작 시 빈 문서를 만들던 것도 없앴다. 그게 실제 이유다 — 코드 없는 문서는 DB 에 저장할 수 없고(FormId 가 "NewSheet"), 사용자는 한참 그려 넣은 뒤에야 그 사실을 알게 된다. 만들 수 있게 두는 것 자체가 함정이었다. 이제 기동 인자에 서식 코드가 없으면 아무것도 열지 않고 서식 목록 탭을 띄운다. 빈 화면 안내도 '서식 목록에서 열기' 하나로 줄였다(F4 · Ctrl+O 병기). CreateNew 와 파일 저장·열기 코드는 남긴다 — 접속 없이 도는 진단이 그 경로를 쓴다. UI 진입점만 없앤 것이고, 이는 'DB에서 열기' 창을 지울 때와 같은 방식이다. NewFileCommand 를 쓰던 --dialog-shots 는 AttachBlankForDiagnostics 로 바꿨다 (이름에 '진단 전용'을 박아 UI 에서 다시 부르지 못하게 했다). ## 없애자마자 드러난 것 문서가 아예 없는 상태가 <b>기본</b>이 되니 속성 패널에 정렬 바와 간격값이 그대로 남아 있었다. CurrentDesigner.Inspector 가 null 이면 안쪽 Visibility 바인딩이 전부 실패하고, WPF 는 <b>실패한 바인딩을 기본값(Visible)으로 떨군다</b> — Collapsed 가 아니다. 선택이 없다는 안내와 정렬 바가 동시에 떠 있었다. 열린 서식이 없으면 인스펙터를 접는다. 그리고 이 회귀는 값으로 잡히지 않으므로 시각 게이트에 대조군을 넣었다 — 00-main-default(문서 있음 → 인스펙터 보임) 대 00d-main-empty(문서 없음 → 접힘). 대조군 없이 빈 화면만 찍으면 "원래 그랬던 것"과 구분되지 않는다. ## 게이트 - dotnet test 323/323 - --edit-smoke 실패 0 - --dialog-shots FAIL 0 (00d-main-empty 추가) - --db-render P062 md5 8d683835f5d81e7bb41c79071d6bf954 불변 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
9bff3dd5f6
commit
3ef1937902
@@ -25,7 +25,6 @@
|
||||
처리하며, 여기 올리면 인스펙터·검색 상자 등 TextBox 의 표준 편집 키와 충돌한다.
|
||||
-->
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Key="N" Modifiers="Control" Command="{Binding NewFileCommand}"/>
|
||||
<!-- Ctrl+O 는 코드비하인드에서 서식 목록으로 보낸다(파일 대화상자가 아니다) -->
|
||||
<KeyBinding Key="S" Modifiers="Control" Command="{Binding SaveFileCommand}"/>
|
||||
<KeyBinding Key="P" Modifiers="Control" Command="{Binding PrintCommand}"/>
|
||||
@@ -164,7 +163,6 @@
|
||||
edit-smoke 직렬화 왕복)이 그 경로를 쓴다. UI 진입점만 없앤 것이다.
|
||||
-->
|
||||
<MenuItem Header="파일(_F)">
|
||||
<MenuItem Header="새 서식(_N)" Command="{Binding NewFileCommand}" InputGestureText="Ctrl+N"/>
|
||||
<MenuItem Header="서식 목록에서 열기(_O)" Click="OnOpenFromListClick" InputGestureText="Ctrl+O"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="저장(_S)" Command="{Binding SaveToDbCommand}" InputGestureText="Ctrl+S"
|
||||
@@ -752,9 +750,8 @@
|
||||
HorizontalAlignment="Center" Margin="0,16,0,6"/>
|
||||
<TextBlock Foreground="{DynamicResource B.Muted}" FontSize="12.5" TextAlignment="Center"
|
||||
TextWrapping="Wrap" HorizontalAlignment="Center" Margin="0,0,0,20"
|
||||
Text="새 서식을 만들거나, 왼쪽 서식 목록에서 기존 서식을 두 번 눌러 엽니다."/>
|
||||
Text="왼쪽 서식 목록에서 서식을 두 번 눌러 엽니다. (F4 또는 Ctrl+O)"/>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<Button Content="새 서식" Command="{Binding NewFileCommand}" Padding="16,7" Margin="0,0,8,0"/>
|
||||
<Button Content="서식 목록에서 열기" Click="OnOpenFromListClick" Padding="16,7"
|
||||
IsEnabled="{Binding CanUseDb}"/>
|
||||
</StackPanel>
|
||||
@@ -771,7 +768,17 @@
|
||||
BorderBrush="{DynamicResource B.Line}" BorderThickness="0,0,0,1">
|
||||
<TextBlock Text="속성" FontWeight="Bold" Foreground="{DynamicResource B.Muted}"/>
|
||||
</Border>
|
||||
<v:InspectorView x:Name="Inspector" DataContext="{Binding CurrentDesigner.Inspector}"/>
|
||||
<!--
|
||||
열린 서식이 없으면 인스펙터를 <b>접는다.</b>
|
||||
DataContext 가 null 이면 안쪽 Visibility 바인딩이 전부 실패하고,
|
||||
WPF 는 실패한 바인딩을 기본값(Visible)으로 떨어뜨린다 —
|
||||
그래서 선택이 없는데도 정렬 바와 간격값이 남아 있었다.
|
||||
'새 서식'을 없애면서 시작 화면에 문서가 아예 없어졌고, 그 자리가 드러났다.
|
||||
-->
|
||||
<v:InspectorView x:Name="Inspector" DataContext="{Binding CurrentDesigner.Inspector}"
|
||||
Visibility="{Binding DataContext.HasOpenDocuments,
|
||||
RelativeSource={RelativeSource AncestorType=Window},
|
||||
Converter={StaticResource BoolToVisibility}}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
Reference in New Issue
Block a user