ui: review candidate physical material cards without assignment (#1344)
Adds a read-only review window to Validate Physical Material Data: paste a schema-1 card, see its known properties in SI units, unknown ones marked, with stated conditions and source claims. Nothing is assigned or saved. Co-authored-by: 0xlillith <0xlillith@users.noreply.github.com>
This commit is contained in:
1 parent
be985f136d
commit
a47e82ba94
11 files changed
+527
No files matched your search
@@ -58,6 +58,7 @@ pub mod inference;
|
||||
pub mod install;
|
||||
pub mod issue_report;
|
||||
pub mod keymap;
|
||||
mod material_card_review;
|
||||
#[cfg(test)]
|
||||
mod menu_tests;
|
||||
#[cfg(test)]
|
||||
@@ -273,6 +274,7 @@ pub struct SolveApp {
|
||||
pub params: Option<params_dialog::ParamsDialog>,
|
||||
/// The Design Properties window, when open.
|
||||
pub design_properties: Option<design_properties::DesignProperties>,
|
||||
material_card_review: Option<material_card_review::ReviewWindow>,
|
||||
pub palette: palette::Palette,
|
||||
/// Context menus, rename box and Properties window.
|
||||
pub menu: context_menu::MenuState,
|
||||
@@ -391,6 +393,7 @@ impl SolveApp {
|
||||
dialog: None,
|
||||
params: None,
|
||||
design_properties: None,
|
||||
material_card_review: None,
|
||||
palette: palette::Palette::default(),
|
||||
menu: context_menu::MenuState::default(),
|
||||
tree: browser::TreeState::default(),
|
||||
@@ -667,6 +670,11 @@ impl SolveApp {
|
||||
self.set_status(format!("{label}: {why}"), true);
|
||||
return;
|
||||
}
|
||||
if id == "material.properties.validate" {
|
||||
self.material_card_review = Some(material_card_review::ReviewWindow::default());
|
||||
self.home.open = false;
|
||||
return;
|
||||
}
|
||||
// Another command ends Edit Text (its dialog is not a feature edit to keep).
|
||||
sketch_text_move::cancel_drag(self);
|
||||
if sketch_text::editing(self) || self.dialog.as_ref().is_some_and(|d| matches!(d.kind, dialogs::Kind::TextMove(_))) {
|
||||
@@ -1315,6 +1323,7 @@ impl SolveApp {
|
||||
self.resolve_fit(ui.ctx());
|
||||
params_dialog::show(self, ui.ctx());
|
||||
design_properties::show(self, ui.ctx());
|
||||
material_card_review::show(self, ui.ctx());
|
||||
recovery_ui::show(self, ui.ctx());
|
||||
stand_up::show(self, ui.ctx());
|
||||
prefs::show_reset_notice(self, ui.ctx());
|
||||
|
||||
Reference in new issue
Block a user