Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
13 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions crates/ui-egui/src/dialogs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ pub struct Dialogs {
/// Map-local layer IDs require the dialog to retain its original project and map as well.
pub projection_map: Option<(u64, usize, String)>,
pub geometry: Option<crate::geometrycalc::Form>,
/// Publication Layout Wizard: what it has asked so far (#2850).
pub publication: Option<crate::publicationwizard::Draft>,
pub repair: Option<crate::repairsource::Form>,
pub conflicts: Option<crate::conflictsui::Form>,
#[cfg(not(target_arch = "wasm32"))]
Expand Down Expand Up @@ -333,6 +335,10 @@ pub fn show(app: &mut RustGisApp, ctx: &egui::Context) {
crate::reloaddata::show(app, ctx);
return;
}
if which == "publicationWizard" {
crate::publicationwizard::show(app, ctx);
return;
}
if which == "repairSource" {
crate::repairsource::show(app, ctx);
return;
Expand Down
9 changes: 9 additions & 0 deletions crates/ui-egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ mod pluginstart;
mod pluginsui;
mod popupmedia;
mod portalsui;
mod publicationwizard;
#[cfg(not(target_arch = "wasm32"))]
mod readjob;
#[cfg(not(target_arch = "wasm32"))]
Expand Down Expand Up @@ -5802,6 +5803,14 @@ impl RustGisApp {
self.dialogs = dialogs::Dialogs { open: Some("calculateGeometry"), geometry: Some(form), ..Default::default() };
return Ok(Value::Null);
}
if which == "publicationWizard" {
// Opened again while open, it keeps what was entered.
if self.dialogs.open != Some("publicationWizard") || self.dialogs.publication.is_none() {
let draft = publicationwizard::Draft::new(&self.session);
self.dialogs = dialogs::Dialogs { open: Some("publicationWizard"), publication: Some(draft), ..Default::default() };
}
return Ok(Value::Null);
}
if which == "offlineConflicts" {
let area = p.get("area").and_then(Value::as_str).ok_or_else(|| tl!("Name the offline area.").to_string())?;
let form = conflictsui::Form::new(&self.session, area)?;
Expand Down
Loading
Loading