Don't change grid settings from Preferences if they aren't modified (fix #3479)

This commit is contained in:
David Capello 2023-03-16 18:08:40 -03:00
parent 7b63651775
commit 298981732e

View File

@ -754,7 +754,10 @@ public:
update_windows_color_profile_from_preferences();
// Change sprite grid bounds
if (m_context && m_context->activeDocument()) {
if (m_context &&
m_context->activeDocument() &&
m_context->activeDocument()->sprite() &&
m_context->activeDocument()->sprite()->gridBounds() != gridBounds()) {
ContextWriter writer(m_context);
Tx tx(m_context, Strings::commands_GridSettings(), ModifyDocument);
tx(new cmd::SetGridBounds(writer.sprite(), gridBounds()));