[Uml-devel] CVS: kdesdk/umbrello/umbrello seqlinewidget.cpp,1.1,1.2
kde at office.kde.org
kde at office.kde.org
Sat Feb 1 17:08:29 UTC 2003
- Previous message: [Uml-devel] CVS: kdesdk/umbrello/umbrello floatingtext.cpp,1.2,1.3 floatingtext.h,1.1,1.2 objectwidget.cpp,1.4,1.5 objectwidget.h,1.1,1.2 uml.cpp,1.8,1.9 umlwidget.cpp,1.3,1.4 umlwidget.h,1.1,1.2
- Next message: [Uml-devel] CVS: kdesdk/umbrello/umbrello/dialogs .cvsignore,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/kde/kdesdk/umbrello/umbrello
In directory office:/tmp/cvs-serv1963
Modified Files:
seqlinewidget.cpp
Log Message:
prevent sequence object vertical lines going lower than the size of the canvas
Index: seqlinewidget.cpp
===================================================================
RCS file: /home/kde/kdesdk/umbrello/umbrello/seqlinewidget.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- seqlinewidget.cpp 23 Jan 2003 22:21:13 -0000 1.1
+++ seqlinewidget.cpp 2 Feb 2003 01:06:46 -0000 1.2
@@ -66,17 +66,26 @@
}
void SeqLineWidget::mouseMoveEvent( QMouseEvent *me ) {
- if( !m_bMouseDown )
- return;
- int dy = (int)me -> y() - m_nOffsetY - m_nOldY;
- QPoint ep = endPoint();
- int newY = (int)ep.y() + dy;
- m_nOldY = newY;
- QPoint sp = startPoint();
- newY = newY < m_nMinY?m_nMinY:newY;
- setPoints( sp.x(), sp.y(), sp.x(), newY );
- m_nLengthY = newY - (int)m_pObject -> y() - m_pObject -> height();
- moveDeconBox();
+ if( m_bMouseDown ) {
+ int dy = (int)me->y() - m_nOffsetY - m_nOldY;
+ QPoint ep = endPoint();
+ int newY = (int)ep.y() + dy;
+ m_nOldY = newY;
+ QPoint sp = startPoint();
+
+ if (newY < m_nMinY) {
+ newY = m_nMinY;
+ }
+
+ int maxY = m_pView->canvas()->height();
+ if (newY > maxY - 10) {
+ newY = maxY - 10;
+ }
+
+ setPoints( sp.x(), sp.y(), sp.x(), newY );
+ m_nLengthY = newY - (int)m_pObject->y() - m_pObject->height();
+ moveDeconBox();
+ }
}
void SeqLineWidget::mouseReleaseEvent( QMouseEvent * /*me*/ ) {
- Previous message: [Uml-devel] CVS: kdesdk/umbrello/umbrello floatingtext.cpp,1.2,1.3 floatingtext.h,1.1,1.2 objectwidget.cpp,1.4,1.5 objectwidget.h,1.1,1.2 uml.cpp,1.8,1.9 umlwidget.cpp,1.3,1.4 umlwidget.h,1.1,1.2
- Next message: [Uml-devel] CVS: kdesdk/umbrello/umbrello/dialogs .cvsignore,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the umbrello-devel
mailing list