[Uml-devel] branches/work/soc-umbrello/umbrello
Gopala Krishna A
krishna.ggk at gmail.com
Wed Nov 12 17:05:09 UTC 2008
SVN commit 883313 by gopala:
Fixed crashes due to passing of -1 value as index to
New::AssociationLine::isEndPointIndex(index) method.
M +3 -3 newlinepath.cpp
--- branches/work/soc-umbrello/umbrello/newlinepath.cpp #883312:883313
@@ -642,7 +642,7 @@
{
if (event->buttons() & Qt::LeftButton) {
m_activePointIndex = closestPointIndex(event->pos());
- if (isEndPointIndex(m_activePointIndex)) {
+ if (m_activePointIndex != -1 && isEndPointIndex(m_activePointIndex)) {
// End points are not drawn and hence not active.
m_activePointIndex = -1;
}
@@ -704,7 +704,7 @@
m_activePointIndex = closestPointIndex(event->pos());
// End points are not drawn and hence not active.
- if (isEndPointIndex(m_activePointIndex)) {
+ if (m_activePointIndex != -1 && isEndPointIndex(m_activePointIndex)) {
m_activePointIndex = -1;
}
// Activate segment index only if point index is -1
@@ -727,7 +727,7 @@
m_activePointIndex = closestPointIndex(event->pos());
// End points are not drawn and hence not active.
- if (isEndPointIndex(m_activePointIndex)) {
+ if (m_activePointIndex != -1 && isEndPointIndex(m_activePointIndex)) {
m_activePointIndex = -1;
}
// Activate segment index only if point index is -1
More information about the umbrello-devel
mailing list