[Uml-devel] branches/work/soc-umbrello-2011/umbrello
Camila San Martin Ayres
smayres at gmail.com
Thu Jul 14 12:55:36 UTC 2011
SVN commit 1241527 by ayres:
Fixing some bugs.
M +8 -7 soc-umbrello-2011/umlwidget.cpp
M +2 -0 toolbarstatearrow.cpp
--- branches/work/soc-umbrello-2011/umbrello/soc-umbrello-2011/umlwidget.cpp #1241526:1241527
@@ -139,25 +139,26 @@
void UMLWidget::mouseMoveEvent(QGraphicsSceneMouseEvent* me)
{
- QGraphicsItem::mouseMoveEvent(me);
- //m_widgetController->mouseMoveEvent(me);
+ if(me != NULL)
+ m_widgetcontroller->mouseMoveEvent(me);
}
void UMLWidget::mousePressEvent(QGraphicsSceneMouseEvent *me)
{
- QGraphicsItem::mousePressEvent(me);
- //m_widgetController->mousePressEvent(me);
+ if(me != NULL)
+ m_widgetcontroller->mousePressEvent(me);
}
void UMLWidget::mouseReleaseEvent(QGraphicsSceneMouseEvent *me)
{
- QGraphicsItem::mouseReleaseEvent(me);
- //m_widgetController->mousePressEvent(me);
+ if(me != NULL)
+ m_widgetcontroller->mousePressEvent(me);
}
void UMLWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* me)
{
- QGraphicsItem::mouseDoubleClickEvent(me);
+ if(me != NULL)
+ m_widgetcontroller->mouseDoubleClickEvent(me);
}
void UMLWidget::drawSelected(QPainter * p, int offsetX, int offsetY)
--- branches/work/soc-umbrello-2011/umbrello/toolbarstatearrow.cpp #1241526:1241527
@@ -96,6 +96,7 @@
qDebug() << "getCurrent_Widget is NULL";
}else{
qDebug() << "getCurrent_Widget is not NULL";
+ if(m_pMouseEvent_new != NULL)
getCurrent_Widget()->mousePressEvent(m_pMouseEvent_new);
}
#endif
@@ -243,6 +244,7 @@
*/
void ToolBarStateArrow::mouseDoubleClickWidget()
{
+ if(getCurrentWidget() != NULL || m_pMouseEvent != NULL)
getCurrentWidget()->mouseDoubleClickEvent(m_pMouseEvent);
#ifdef SOC2011
if(getCurrent_Widget() != NULL || m_pMouseEvent_new != NULL){
More information about the umbrello-devel
mailing list