Bug 121238 - Sequencediagram: messages as constructor works only properly at 100% zoom
Summary: Sequencediagram: messages as constructor works only properly at 100% zoom
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-02 17:29 UTC by Robert Müller
Modified: 2006-03-02 23:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Müller 2006-02-02 17:29:48 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Ubuntu Packages
OS:                Linux

in sequence diagram:
using a message as constructor (by clicking on the object itself instead of the objects vertical lifeline) seems to work properly only in 100% zoom.
Comment 1 Oliver Kellogg 2006-03-02 23:53:03 UTC
SVN commit 515177 by okellogg:

mouseRelease(): Reuse Yan Morin's drag'n'drop patch from
http://www.geeksoc.org/~jr/umbrello/uml-devel/9259.html
BUG:121238


 M  +7 -6      toolbarstatemessages.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/umbrello/toolbarstatemessages.cpp #515176:515177
@@ -73,12 +73,13 @@
         UMLWidget* obj = 0;
         while ( (obj = it.current()) != 0 ) {
             ++it;
-            if ( obj->isVisible() &&
-                    obj->getBaseType() == Uml::wt_Object &&
-                    obj->onWidget(ome->pos()) ) {
-                clickedOnWidget = static_cast<ObjectWidget*>(obj);
-                isCreationMessage = true;
-                break;
+            if (obj->isVisible() && obj->getBaseType() == Uml::wt_Object) {
+                const QPoint zoomAdjustedPos = (ome->pos() * 100) / m_pUMLView->getZoom();
+                if (obj->onWidget(zoomAdjustedPos)) {
+                    clickedOnWidget = static_cast<ObjectWidget*>(obj);
+                    isCreationMessage = true;
+                    break;
+                }
             }
         }
     }