form pages robust finish chnages
This commit is contained in:
@@ -446,6 +446,9 @@ pub async fn run_ui() -> Result<()> {
|
||||
AppView::AddLogic => router.navigate(Page::AddLogic(admin_state.add_logic_state.clone())),
|
||||
AppView::Form(path) => {
|
||||
// Router now carries the path; just navigate with it
|
||||
if let Some((profile, table)) = path.split_once('/') {
|
||||
app_state.set_current_view_table(profile.to_string(), table.to_string());
|
||||
}
|
||||
router.navigate(Page::Form(path.clone()));
|
||||
}
|
||||
AppView::Scratch => {}
|
||||
@@ -610,7 +613,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
|
||||
if let Page::Form(path) = &router.current {
|
||||
if !table_just_switched {
|
||||
if position_changed && !app_state.is_canvas_edit_mode() {
|
||||
if position_changed && !app_state.is_canvas_edit_mode_at(path) {
|
||||
position_logic_needs_redraw = true;
|
||||
|
||||
if let Some(form_state) = app_state.form_state_for_path(path) {
|
||||
@@ -648,7 +651,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
form_state.current_cursor_pos =
|
||||
event_handler.ideal_cursor_column.min(max_cursor_pos);
|
||||
}
|
||||
} else if !position_changed && !app_state.is_canvas_edit_mode() {
|
||||
} else if !position_changed && !app_state.is_canvas_edit_mode_at(path) {
|
||||
if let Some(form_state) = app_state.form_state_for_path(path) {
|
||||
let current_input_str = form_state.get_current_input();
|
||||
let current_input_len = current_input_str.chars().count();
|
||||
|
||||
Reference in New Issue
Block a user