Summary: | drag 'n drop a class when the zoom is not 1:1 don't put the class under mouse cursor | ||
---|---|---|---|
Product: | [Applications] umbrello | Reporter: | Yan Morin <yansanmo.site> |
Component: | general | Assignee: | Umbrello Development Group <umbrello-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kde.org |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Yan Morin
2006-02-19 17:22:31 UTC
umlview.cpp Maybe in: 444 void UMLView::slotObjectCreated(UMLObject* o) with m_Pos.x() or y. Or in: 666 void UMLView::contentsDropEvent(QDropEvent *e) { ... 700 m_Pos = e->pos(); Index: umlview.cpp =================================================================== --- umlview.cpp (revision 511314) +++ umlview.cpp (working copy) @@ -697,7 +697,7 @@ return; } m_bCreateObject = true; - m_Pos = e->pos(); + m_Pos = (e->pos() * 100 ) / m_nZoom; slotObjectCreated(o); SVN commit 513929 by okellogg: Apply attachment http://www.geeksoc.org/~jr/umbrello/uml-devel/att-9255/umbrello-isDatatype.patch >From http://www.geeksoc.org/~jr/umbrello/uml-devel/9259.html C++ isDatatype patch for typedef unsigned int/uint case and fix for putting class under mouse cursor when diagram zoom is not 1:1 Many thanks to Yan Morin <yansanmo.site_AT_gmail.com> BUG:122293 M +1 -0 THANKS M +8 -1 umbrello/classparser/cpptree2uml.cpp M +7 -0 umbrello/import_utils.cpp M +5 -0 umbrello/import_utils.h M +1 -1 umbrello/umlview.cpp --- branches/KDE/3.5/kdesdk/umbrello/THANKS #513928:513929 @@ -47,6 +47,7 @@ martin <mv123q3 @hotmail.com> Rene Meyer <Rene.Meyer @sturmit.de> Laurent Montel <montel @kde.org> +Yan Morin <yansanmo.site @gmail.com> Tom Morris <tfmorris @gmail.com> Lutz Mueller <lutz.mueller @gmx.de> Heiko Nardmann <heiko.nardmann @onlinehome.de> --- branches/KDE/3.5/kdesdk/umbrello/umbrello/classparser/cpptree2uml.cpp #513928:513929 @@ -144,7 +144,14 @@ //#endif /* @todo Trace typedefs back to their root type for deciding whether to build a Datatype (for pointers.) */ - if (type.contains('*')) { + /* check out if the ID type is a Datatype + ex: typedef unsigned int uint; + where unsigned int is a known datatype + I'm not sure if setIsReference() should be run + */ + bool isDatatype = Import_Utils::isDatatype(typeId, m_currentNamespace[m_nsCnt]); + + if (type.contains('*') || isDatatype) { UMLObject *inner = Import_Utils::createUMLObject( Uml::ot_Class, typeId, m_currentNamespace[m_nsCnt] ); --- branches/KDE/3.5/kdesdk/umbrello/umbrello/import_utils.cpp #513928:513929 @@ -349,5 +349,12 @@ incPathList.append(path); } + +bool isDatatype(QString name, UMLPackage *parentPkg) { + UMLDoc *umldoc = UMLApp::app()->getDocument(); + UMLObject * o = umldoc->findUMLObject(name, Uml::ot_Datatype, parentPkg); + return (o!=NULL); +} + } // end namespace Import_Utils --- branches/KDE/3.5/kdesdk/umbrello/umbrello/import_utils.h #513928:513929 @@ -134,6 +134,11 @@ */ bool newUMLObjectWasCreated(); + /** + * Returns true if a type is an actual Datatype + */ + bool isDatatype(QString name, UMLPackage *parentPkg = NULL); + } // end namespace Import_Utils #endif --- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlview.cpp #513928:513929 @@ -697,7 +697,7 @@ return; } m_bCreateObject = true; - m_Pos = e->pos(); + m_Pos = (e->pos() * 100 ) / m_nZoom; slotObjectCreated(o); *** Bug 112237 has been marked as a duplicate of this bug. *** |