Bug 112293 - clicking on an object in a box selects the box instead of the object
Summary: clicking on an object in a box selects the box instead of the object
Status: RESOLVED FIXED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-09 07:55 UTC by Alan Ezust
Modified: 2005-09-09 08:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Ezust 2005-09-09 07:55:52 UTC
Version:           3.4.89 (using KDE KDE 3.4.2)
Installed from:    Debian testing/unstable Packages
OS:                Linux

In general, boxes are transparent, but it is often desirable to select/move the items contained inside the box. Currently, when a box is drawn around a bunch of items, and you try to select an object inside the box, the box is always selected instead. The box should only be selected if the clicked area does not coincide with a contained object.
Comment 1 Oliver Kellogg 2005-09-09 08:17:46 UTC
SVN commit 458849 by okellogg:

BUG:112293 - fixEPS(): Supply integer values at the %%BoundingBox.


 M  +1 -1      ChangeLog  
 M  +6 -4      umbrello/umlview.cpp  


--- branches/KDE/3.5/kdesdk/umbrello/ChangeLog #458848:458849
@@ -11,7 +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 112017
+111768 112017 112293
 
 Version 1.4.2 (maintenance release)
 
--- branches/KDE/3.5/kdesdk/umbrello/umbrello/umlview.cpp #458848:458849
@@ -1388,13 +1388,15 @@
         if (epsfile.open(IO_WriteOnly | IO_Truncate)) {
             // read information
             QRegExp rx("%%BoundingBox:\\s*(-?[\\d\\.]+)\\s*(-?[\\d\\.]+)\\s*(-?[\\d\\.]+)\\s*(-?[\\d\\.]+)");
-            int pos = rx.search(fileContent);
-            float left = rx.cap(1).toFloat();
-            float top = rx.cap(4).toFloat();
+            const int pos = rx.search(fileContent);
+            const int left = (int)rx.cap(1).toFloat();
+            const int right = left + rect.width();
+            const int top = (int)rx.cap(4).toFloat();
+            const int bottom = top - rect.height();
 
             // modify content
             fileContent.replace(pos,rx.cap(0).length(),
-                                QString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(top-rect.height()).arg(left+rect.width()).arg(top));
+                                QString("%%BoundingBox: %1 %2 %3 %4").arg(left).arg(bottom).arg(right).arg(top));
 
             ts << fileContent;
             epsfile.close();