KDE Bug Tracking System
Home
Report New Wish or Bug
Query Existing Reports
First
Last
Prev
Next
No search results available
Search page
Bug
122293
:
drag 'n drop a class when the zoom is not 1:1 d...
P
roduct
:
umbrello
Co
m
ponent
:
general
Status
:
RESOLVED
Resolution
:
FIXED
Target
:
---
Version
:
unspecified
Pr
i
ority
:
NOR
Severity
:
normal
V
otes
:
0
Description
:
Opened:
2006-02-19 17:22
Last Changed:
2006-03-22 07:50:23
Version: 1.5.2 (using KDE KDE 3.5.1) Installed from: Compiled From Sources How to reproduce: 1. Select a zoom level that is not 1:1 (ex: 50%) 2. Drag'n'drop a class inside the class diagram area 3. Release the mouse button Expected Behaviour: The top-left corner should be in the same position as the cursor like or like in 1:1 zoom.
Comment
#1
Yan Morin 2006-02-19 18:03:59
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();
Comment
#2
Yan Morin 2006-02-19 18:30:31
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);
Comment
#3
Oliver Kellogg 2006-02-26 23:41:48
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);
Comment
#4
Oliver Kellogg 2006-03-22 07:50:23
***
Bug 112237
has been marked as a duplicate of this bug. ***
P
latform
:
Compiled Sources
O
S
:
Linux
K
eywords
:
U
RL
:
People
Reporter
:
Yan Morin
Assigned To
:
Umbrello Development Group
CC
:
kde org patdouble com
Related actions
View Bug Activity
Format For Printing
XML
Clone This Bug
Note
You need to
log in
before you can comment on or make changes to this bug.
Attachments
Add an attachment
(proposed patch, testcase, etc.)
Depends on
:
B
locks
:
Show dependency tree
-
Show dependency graph
First
Last
Prev
Next
No search results available
Search page
Actions
Reports
Requests
Reports
Bugs reported today
Bugs reported in the last 3 days
Bug reports with patches
Weekly Bug statistics
The most hated bugs
The most severe bugs
The most frequently reported bugs
The most wanted features
Junior Jobs
Report ownership counts and charts
My Account
New Account
Log In