Skip to content

Commit 1a0f653

Browse files
committed
fix: project profile name shows stale value after save
After saving in the editor, clear_model_info() empties m_last_payload. If index.html loads and sends request_3mf_info before the background on_reload() thread completes — or if on_reload()'s RunScript call is dropped during webview navigation — the page receives no data and continues to display the pre-save profile name. Fall back to update_model_data() when request_3mf_info arrives with an empty m_last_payload. This triggers a fresh on_reload() which dispatches the up-to-date model data directly to the now-loaded page.
1 parent 7b7b27a commit 1a0f653

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/slic3r/GUI/Project.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,12 @@ void ProjectPanel::OnScriptMessage(wxWebViewEvent& evt)
389389
wxGetApp().CallAfter([this, strJS] {
390390
RunScript(strJS.ToStdString());
391391
});
392+
} else {
393+
// m_last_payload was cleared (e.g. after a save) and the background
394+
// reload may not have finished yet — or its dispatch was dropped during
395+
// webview navigation. Trigger a fresh reload so the new page receives
396+
// up-to-date model data once the reload completes.
397+
update_model_data();
392398
}
393399
}
394400
else if (strCmd == "request_confirm_save_project") {

0 commit comments

Comments
 (0)