Don't mark the document as modified on creation
KisGridManager::setView called setConfigImpl with the emitModified
parameter set to false explicitly to avoid this; but calling
emit sigRequestUpdateGridConfig(config); directly after that defies
the purpose because that calls GridConfigWidget::setGridConfig
which calls GridConfigWidget::setGridConfigImpl(const KisGridConfig &value)
which GridDockerDock::slotGuiGridConfigChanged(), which calls...
m_canvas->viewManager()->gridManager()->setGridConfig(m_configWidget->gridConfig());
which calls setGridConfigImpl(config, true); -- which emits the modified
signal.
Sometimes I think that Italy can learn a lesson from us when it comes
to creating impressive pastas.