Version: 1.4.2 (using KDE KDE 3.4.2) When the user creates a new class property from the "Properties" dialog, the "Attribute properties" dialog pops up. In that dialog, the default visibility is always set on "private". It would be nice if the visibility depended on the last editing because sometimes the user adds a pile of attributes that share the same visibility and if that visibility isn't "private", the user has to constantly change that option.
SVN commit 455198 by okellogg: UMLAttributeDialog::apply(): Set the scope as the default in the option state. BUG:111768 M +1 -0 ChangeLog M +9 -4 umbrello/dialogs/umlattributedialog.cpp M +3 -0 umbrello/uml.h --- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #455197:455198 @@ -11,6 +11,7 @@ * Bugs fixed / wishes implemented (see http://bugs.kde.org) 57588 58809 66461 67719 72016 79433 87252 88117 97162 105564 108223 109591 109636 110216 110231 110379 111088 111470 111502 111759 +111768 Version 1.4.2 (maintenance release) --- branches/KDE/3.5/kdesdk/umbrello/umbrello/dialogs/umlattributedialog.cpp #455197:455198 @@ -160,13 +160,18 @@ return false; } m_pAttribute->setName(name); + Uml::Scope scope = Uml::Protected; if ( m_pPublicRB->isChecked() ) { - m_pAttribute->setScope(Uml::Public); + scope = Uml::Public; } else if ( m_pPrivateRB -> isChecked() ) { - m_pAttribute->setScope(Uml::Private); - } else { - m_pAttribute->setScope(Uml::Protected); + scope = Uml::Private; } + m_pAttribute->setScope(scope); + // Set the scope as the default in the option state + Settings::OptionState optionState = UMLApp::app()->getOptionState(); + optionState.classState.defaultAttributeScope = scope; + UMLApp::app()->setOptionState(optionState); + m_pAttribute->setInitialValue( m_pInitialLE->text() ); m_pAttribute->setStereotype( m_pStereoTypeLE->text() ); m_pAttribute->setStatic( m_pStaticCB->isChecked() ); --- branches/KDE/3.5/kdesdk/umbrello/umbrello/uml.h #455197:455198 @@ -951,6 +951,9 @@ Settings::OptionState getOptionState() { return m_optionState; } + void setOptionState(Settings::OptionState optstate) { + m_optionState = optstate; + } signals:
wow that was quick! Thanks for the fix, Olivier!