Version 2.3: стабилизация редактора и безопасная запись DMI - #8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 789a1719d8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _savedConfig = string.IsNullOrWhiteSpace(path) ? null : config.Clone(); | ||
| IsDirty = _savedConfig is null; |
There was a problem hiding this comment.
Preserve dirty baselines when activating queued configs
When a saved config is edited, SyncCurrentConfigIntoActiveQueueItem stores the modified snapshot together with its existing path; switching away and back then calls SetCurrentConfig(snapshot, path), and this line incorrectly treats that modified snapshot as the saved baseline. Consequently IsDirty becomes false and the UI reports the config as unmodified even though its changes were never written to disk. Queue activation needs to preserve the original saved baseline/dirty state or use a separate session-restore path rather than the disk-load semantics. AGENTS/PROJECT_CONTEXT.mdL29-L29
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a36f05427f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| var result = _applyConfigTransformUseCase.Execute(current => current.WithEditorSettings(settings)); | ||
| ApplyMutationResult(result, $"Mirror axis moved to {value:+#;-#;0} pixel(s).", refreshPreview: false); |
There was a problem hiding this comment.
Resynchronize the mirror axis after undo and redo
When a user changes the mirror-axis offset, this transform enters the EditorSession undo history, but the Undo/Redo commands only refresh the UI and never call SynchronizeMirrorAxisFromConfig. After Ctrl+Z or Ctrl+Shift+Z, projection uses the offset from the restored config while MirrorAxisOffsetPixels—and therefore the displayed guide, dialog value, and persisted workspace setting—still contains the previous offset, so subsequent mirrored edits are applied around a different axis than the one shown. Synchronize the ViewModel from the config returned by both commands. AGENTS/PROJECT_CONTEXT.mdL29-L29
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88397a368b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| resolution, | ||
| supportedDirections, | ||
| metadata, | ||
| editorSettings ?? SpriteEditorSettings.Default, |
There was a problem hiding this comment.
Preserve mirror settings when clearing mappings
When a config has a nonzero mirror-axis offset, ResetActiveConfig rebuilds it via CreateEmpty without passing editorSettings, so this fallback silently resets the persisted axis to zero. The ViewModel's MirrorAxisOffsetPixels is not synchronized on that path, leaving the guide at the old offset while subsequent propagated edits use the centered axis; preserve the current settings during a mapping reset or explicitly resynchronize the shell afterward. AGENTS/PROJECT_CONTEXT.mdL29-L29
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ded992b269
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ShowMirrorAxisGuide="{Binding DataContext.EditorWorkspace.ShowMirrorAxisGuide, RelativeSource={RelativeSource AncestorType=Window}}" | ||
| MirrorAxisOffsetPixels="{Binding DataContext.EditorWorkspace.MirrorAxisOffsetPixels, RelativeSource={RelativeSource AncestorType=Window}}" |
There was a problem hiding this comment.
Bind the mirror guide to properties that exist
When the user enables Axis guide or restores that setting at startup, these bindings resolve through EditorWorkspaceViewModel, but that type exposes neither ShowMirrorAxisGuide nor MirrorAxisOffsetPixels; the properties were added only to its nested CommandBar. WPF therefore leaves both dependency properties at their defaults (false and 0), so the guide never appears on the source or editable canvases regardless of the configured axis. Bind through EditorWorkspace.CommandBar or add forwarding properties to EditorWorkspaceViewModel. AGENTS/PROJECT_CONTEXT.mdL29-L29
Useful? React with 👍 / 👎.
Изменения
Причина
Артефакты редактора вызывались смещённой и прижимаемой к краю проекцией, а жесты могли фиксироваться несколькими частями. Запись DMI не проверяла итоговый файл перед заменой исходника.
Результат
Зеркальные операции больше не объединяют пиксели на границе, инструменты применяют жесты атомарно, а ошибка, отмена или неуспешная проверка DMI не изменяет исходный файл.
Проверка