summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Habacker <[email protected]>2015-06-21 21:14:54 +0200
committerRalf Habacker <[email protected]>2015-06-21 21:24:28 +0200
commit7fecc0473a3a87290fc21d425a7c41157352de61 (patch)
treec6129c6efc3839aaf0bda2d10c9096f47c69f122
parentb78b2581cf9f7de0e8ca92cd7df0cd2e4684715a (diff)
Fix inefficent usage of Settings::optionState().
We do not need to copy the whole struct to set a single attribute because optionState() returns a reference to the struct.
-rw-r--r--umbrello/dialogs/umlattributedialog.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/umbrello/dialogs/umlattributedialog.cpp b/umbrello/dialogs/umlattributedialog.cpp
index 6cfeb40..bd49a1b 100644
--- a/umbrello/dialogs/umlattributedialog.cpp
+++ b/umbrello/dialogs/umlattributedialog.cpp
@@ -140,9 +140,7 @@ bool UMLAttributeDialog::apply()
m_visibilityEnumWidget->apply();
// Set the scope as the default in the option state
- Settings::OptionState optionState = Settings::optionState();
- optionState.classState.defaultAttributeScope = m_pAttribute->visibility();
- Settings::setOptionState(optionState);
+ Settings::optionState().classState.defaultAttributeScope = m_pAttribute->visibility();
m_pAttribute->setInitialValue(m_pInitialLE->text());
m_stereotypeWidget->apply();