[Uml-devel] kdesdk/umbrello/umbrello
Klas Kalass
klas.kalass at gmx.de
Wed Mar 19 06:03:01 UTC 2003
CVS commit by kalass:
it was so hard to send a message between two objects in a sequence diagram that I thought it is not implemented at all - increasing the region where one may hit the sequence line
M +8 -2 seqlinewidget.cpp 1.4
M +1 -0 seqlinewidget.h 1.2
--- kdesdk/umbrello/umbrello/seqlinewidget.cpp #1.3:1.4
@@ -17,4 +17,8 @@
#include "seqlinewidget.h"
+// class members
+int const SeqLineWidget::m_nMouseDownEpsilonX = 20;
+
+//
SeqLineWidget::SeqLineWidget( UMLView * pView, ObjectWidget * pObject ) : QCanvasLine( pView -> canvas() ) {
m_pView = pView;
@@ -39,6 +43,8 @@ bool SeqLineWidget::onWidget( const QPoi
QPoint ep = endPoint();
//see if on widget ( for message creation )
- if( sp.x() - 2 < p.x() && ep.x() + 2 > p.x() &&
- sp.y() < p.y() && ep.y() + 3 > p.y() ) {
+ if( sp.x() - m_nMouseDownEpsilonX < p.x()
+ && ep.x() + m_nMouseDownEpsilonX > p.x()
+ && sp.y() < p.y() && ep.y() + 3 > p.y() )
+ {
bOnWidget = true;
}
--- kdesdk/umbrello/umbrello/seqlinewidget.h #1.1:1.2
@@ -126,4 +126,5 @@ protected:
int m_nOffsetY, m_nOldY, m_nMinY;
+ static int const m_nMouseDownEpsilonX;
};
More information about the umbrello-devel
mailing list