forked from 1b-agent/opencadstudio-upstream
fix(styles): re-seed missing Standard styles on open; titled modals (#366)
Deleting/renaming Standard was already blocked in the five style managers, but a file saved without the built-ins (foreign or damaged) opened with broken style dropdowns and nothing to reference — re-seed missing Standard text/dim/table/mleader/mline styles on every open. Every modal dialog now shows its name in the title bar: centred at 15px across the dialog width, with the move grip and close button overlaid at the right edge. The bar takes an explicit width from the caller — a Fill child inside the Shrink frame would blow the dialog out to the full screen. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bd27ee31d0
commit
ac14e0041d
7 files changed
+127
-1
No files matched your search
@@ -224,6 +224,9 @@ impl OpenCADStudio {
|
||||
Ok(doc) => {
|
||||
let i = self.active_tab;
|
||||
self.tabs[i].scene.document = doc;
|
||||
crate::app::style_ops::ensure_standard_styles(
|
||||
&mut self.tabs[i].scene.document,
|
||||
);
|
||||
self.tabs[i].adopt_active_ucs_from_header();
|
||||
self.tabs[i].current_path = Some(PathBuf::from(path));
|
||||
self.tabs[i].is_start = false;
|
||||
|
||||
Reference in new issue
Block a user