MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / closeEvent

Method closeEvent

Gui/PreferencesPanel.cpp:1229–1243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1227}
1228
1229void
1230PreferencesPanel::closeEvent(QCloseEvent*)
1231{
1232 if ( !_imp->closeIsOK && (!_imp->changedKnobs.empty() || _imp->pluginSettingsChanged) ) {
1233 SettingsPtr settings = appPTR->getCurrentSettings();
1234 if ( !_imp->changedKnobs.empty() ) {
1235 settings->beginChanges();
1236 settings->restoreKnobsFromSettings(_imp->changedKnobs);
1237 settings->endChanges();
1238 }
1239 if (_imp->pluginSettingsChanged) {
1240 settings->restorePluginSettings();
1241 }
1242 }
1243}
1244
1245void
1246PreferencesPanel::keyPressEvent(QKeyEvent* e)

Callers

nothing calls this directly

Calls 6

emptyMethod · 0.80
getCurrentSettingsMethod · 0.80
restorePluginSettingsMethod · 0.80
beginChangesMethod · 0.45
endChangesMethod · 0.45

Tested by

no test coverage detected