[Uml-devel] KDE/kdesdk/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Sep 29 17:31:17 UTC 2006
SVN commit 590283 by okellogg:
sync with branches/KDE/3.5 (r587568:589764)
M +1 -0 ChangeLog
M +11 -7 umbrello/codeimport/import_utils.cpp
M +1 -1 umbrello/uml.cpp
M +2 -3 umbrello/umldoc.cpp
M +1 -1 umbrello/umlwidgetcontroller.cpp
--- trunk/KDE/kdesdk/umbrello/ChangeLog #590282:590283
@@ -2,6 +2,7 @@
* PHP5 generator creates stub methods for all interfaces a class implements (C. Brunsdon)
* Fix load of associations in collaboration diagram (A. Spangler)
+* Fix for single selection of an unselected widget when other widgets are selected
* Bugs/wishes from http://bugs.kde.org:
* "role A properties" should give class name (69244)
* Sharing designs, Folders, 3rd Party imports (87252, reimplementation)
--- trunk/KDE/kdesdk/umbrello/umbrello/codeimport/import_utils.cpp #590282:590283
@@ -25,6 +25,7 @@
#include "../umlobject.h"
#include "../docwindow.h"
#include "../package.h"
+#include "../folder.h"
#include "../enum.h"
#include "../datatype.h"
#include "../classifier.h"
@@ -119,6 +120,12 @@
QString comment,
QString stereotype) {
UMLDoc *umldoc = UMLApp::app()->getDocument();
+ UMLFolder *logicalView = umldoc->getRootFolder(Uml::mt_Logical);
+ if (parentPkg == NULL) {
+ // kDebug() << "Import_Utils::createUMLObject(" << name
+ // << "): parentPkg is NULL, assuming Logical View" << endl;
+ parentPkg = logicalView;
+ }
UMLObject * o = umldoc->findUMLObject(name, type, parentPkg);
bNewUMLObjectWasCreated = false;
if (o == NULL) {
@@ -135,7 +142,7 @@
if (origType == NULL) {
// Still not found. Create the stripped down type.
if (bPutAtGlobalScope)
- parentPkg = NULL;
+ parentPkg = logicalView;
// Find, or create, the scopes.
QStringList components;
if (typeName.contains("::")) {
@@ -182,11 +189,8 @@
// Create the full given type (including adornments.)
if (isConst)
name.prepend("const ");
- if (bPutAtGlobalScope) {
- parentPkg = NULL;
- bPutAtGlobalScope = false;
- }
- o = Object_Factory::createUMLObject(Uml::ot_Datatype, name, parentPkg,
+ o = Object_Factory::createUMLObject(Uml::ot_Datatype, name,
+ umldoc->getDatatypeFolder(),
false); //solicitNewName
UMLDatatype *dt = static_cast<UMLDatatype*>(o);
UMLClassifier *c = dynamic_cast<UMLClassifier*>(origType);
@@ -236,7 +240,7 @@
bool isStatic /* =false */) {
Uml::Object_Type ot = owner->getBaseType();
Uml::Programming_Language pl = UMLApp::app()->getActiveLanguage();
- if (ot != Uml::ot_Class && pl != Uml::pl_Java) {
+ if (! (ot == Uml::ot_Class || ot == Uml::ot_Interface && pl == Uml::pl_Java)) {
kDebug() << "insertAttribute: Don't know what to do with "
<< owner->getName() << " (object type " << ot << ")" << endl;
return NULL;
--- trunk/KDE/kdesdk/umbrello/umbrello/uml.cpp #590282:590283
@@ -1160,7 +1160,7 @@
m_config -> setGroup( "General Options" );
Settings::OptionState& optionState = Settings::getOptionState();
optionState.generalState.undo = m_config->readEntry( "undo", true );
- optionState.generalState.tabdiagrams = m_config->readEntry( "tabdiagrams", true );
+ optionState.generalState.tabdiagrams = m_config->readEntry( "tabdiagrams", false );
#if defined (BUG84739_FIXED)
optionState.generalState.newcodegen = m_config->readEntry("newcodegen", false );
#else
--- trunk/KDE/kdesdk/umbrello/umbrello/umldoc.cpp #590282:590283
@@ -710,12 +710,11 @@
UMLObject* UMLDoc::findUMLObject(const QString &name,
Object_Type type /* = ot_UMLObject */,
UMLObject *currentObj /* = NULL */) {
- UMLObjectList list = m_datatypeRoot->containedObjects();
- UMLObject *o = Model_Utils::findUMLObject(list, name, type, currentObj);
+ UMLObject *o = m_datatypeRoot->findObject(name);
if (o)
return o;
for (int i = 0; i < Uml::N_MODELTYPES; i++) {
- list = m_root[i]->containedObjects();
+ UMLObjectList list = m_root[i]->containedObjects();
o = Model_Utils::findUMLObject(list, name, type, currentObj);
if (o)
return o;
--- trunk/KDE/kdesdk/umbrello/umbrello/umlwidgetcontroller.cpp #590282:590283
@@ -95,7 +95,7 @@
int count = m_widget->m_pView->getSelectCount(true);
if (me->button() == Qt::LeftButton) {
- if (count > 1) {
+ if (m_widget->m_bSelected && count > 1) {
//Single selection is made in release event if the widget wasn't moved
m_inMoveArea = true;
return;
More information about the umbrello-devel
mailing list