mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-15 17:55:52 +08:00
Set the project state to 'dirty' only if a project has a name (was saved or loaded).
Do not mark the project as dirty if it is a new project which hasn't been saved yet.
This commit is contained in:
parent
6c37955d75
commit
7eea15fdde
@ -195,7 +195,9 @@ void ProjectDirtyStateManager::update_from_undo_redo_stack(UpdateType type)
|
|||||||
void ProjectDirtyStateManager::update_from_presets()
|
void ProjectDirtyStateManager::update_from_presets()
|
||||||
{
|
{
|
||||||
m_state.presets = false;
|
m_state.presets = false;
|
||||||
for (const auto& [type, name] : wxGetApp().get_selected_presets()) {
|
// check switching of the presets only for exist/loaded project, but not for new
|
||||||
|
if (!wxGetApp().plater()->get_project_filename().IsEmpty()) {
|
||||||
|
for (const auto& [type, name] : wxGetApp().get_selected_presets())
|
||||||
m_state.presets |= !m_initial_presets[type].empty() && m_initial_presets[type] != name;
|
m_state.presets |= !m_initial_presets[type].empty() && m_initial_presets[type] != name;
|
||||||
}
|
}
|
||||||
m_state.presets |= wxGetApp().has_unsaved_preset_changes();
|
m_state.presets |= wxGetApp().has_unsaved_preset_changes();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user