[Uml-devel] KDE/kdesdk/umbrello
Oliver Kellogg
okellogg at users.sourceforge.net
Fri Mar 30 19:29:10 UTC 2007
SVN commit 648223 by okellogg:
merge r646768:647978 from branches/KDE/3.5/kdesdk
M +2 -0 ChangeLog
M +1 -1 umbrello/associationwidget.cpp
M +0 -1 umbrello/classifier.cpp
M +2 -1 umbrello/codeclassfield.cpp
M +2 -2 umbrello/toolbarstate.cpp
M +6 -1 umbrello/toolbarstatearrow.cpp
M +1 -1 umbrello/toolbarstatemessages.cpp
M +1 -1 umbrello/umlview.cpp
M +1 -1 umbrello/umlview.h
M +1 -1 umbrello/umlwidget.cpp
M +1 -1 umbrello/umlwidgetcontroller.cpp
--- trunk/KDE/kdesdk/umbrello/ChangeLog #648222:648223
@@ -10,6 +10,7 @@
* Operations of the Interface are not implemented in the class automatically
(111593)
* Relationships for entities do not live outside of the diagram (125146)
+* Crashes while loading file (Advanced Code Generators enabled) (126262)
* Multiplicity labels often are placed incorrectly (127628)
* Crash on adding operation to class with Advanced Code Generators enabled
(131528)
@@ -31,6 +32,7 @@
not checked (142093)
* Missing "with" on Ada code generation for aggregation (142392)
* Operation Properties "Type" combo box too small (143319)
+* Support duplication of diagrams (143581)
Version 1.5.61
--- trunk/KDE/kdesdk/umbrello/umbrello/associationwidget.cpp #648222:648223
@@ -2555,7 +2555,7 @@
// Prevent the moving vertex from disappearing underneath a widget
// (else there's no way to get it back.)
- UMLWidget *onW = m_pView->testOnWidget(p);
+ UMLWidget *onW = m_pView->getWidgetAt(p);
if (onW && onW->getBaseType() != Uml::wt_Box) { // boxes are transparent
const int pX = p.x();
const int pY = p.y();
--- trunk/KDE/kdesdk/umbrello/umbrello/classifier.cpp #648222:648223
@@ -993,7 +993,6 @@
totalSuccess = false;
}
} else if (!Model_Utils::isCommonXMIAttribute(tag)) {
- UMLDoc *umldoc = UMLApp::app()->getDocument();
UMLObject *pObject = Object_Factory::makeObjectFromXMI(tag);
if (pObject == NULL) {
totalSuccess = false;
--- trunk/KDE/kdesdk/umbrello/umbrello/codeclassfield.cpp #648222:648223
@@ -595,7 +595,7 @@
m_writeOutMethods = false;
m_listClassName = QString ("");
- m_declCodeBlock = CodeGenFactory::newDeclarationCodeBlock(getParentDocument(), this);
+ m_declCodeBlock = NULL;
m_methodVector.setAutoDelete(false);
// m_methodMap = new QMap<CodeAccessorMethod::AccessorType, CodeAccessorMethod *>;
@@ -605,6 +605,7 @@
}
void CodeClassField::finishInitialization() {
+ m_declCodeBlock = CodeGenFactory::newDeclarationCodeBlock(getParentDocument(), this);
initAccessorMethods();
updateContent();
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstate.cpp #648222:648223
@@ -98,7 +98,7 @@
void ToolBarState::mouseDoubleClick(QMouseEvent* ome) {
setMouseEvent(ome, QEvent::MouseButtonDblClick);
- UMLWidget* currentWidget = m_pUMLView->testOnWidget(m_pMouseEvent->pos());
+ UMLWidget* currentWidget = m_pUMLView->getWidgetAt(m_pMouseEvent->pos());
AssociationWidget* currentAssociation = getAssociationAt(m_pMouseEvent->pos());
if (currentWidget) {
setCurrentWidget(currentWidget);
@@ -175,7 +175,7 @@
}
// Check widgets.
- UMLWidget *widget = m_pUMLView->testOnWidget(m_pMouseEvent->pos());
+ UMLWidget *widget = m_pUMLView->getWidgetAt(m_pMouseEvent->pos());
if (widget) {
setCurrentWidget(widget);
return;
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstatearrow.cpp #648222:648223
@@ -45,10 +45,15 @@
}
void ToolBarStateArrow::mousePressEmpty() {
+ if (m_pMouseEvent->button() != Qt::LeftButton) {
+ // Leave widgets selected upon RMB press on empty diagram area.
+ // The popup menu is activated upon RMB release.
+ return;
+ }
ToolBarState::mousePressEmpty();
// Starts the selection rectangle
- if (m_pMouseEvent->button() == Qt::LeftButton && m_selectionRect.count() == 0) {
+ if (m_selectionRect.count() == 0) {
m_startPosition = m_pMouseEvent->pos();
for (int i = 0; i < 4; i++) {
--- trunk/KDE/kdesdk/umbrello/umbrello/toolbarstatemessages.cpp #648222:648223
@@ -75,7 +75,7 @@
//However, the applied patch doesn't seem to be necessary no more, so it was removed
//The widgets weren't got from UMLView, but from a method in this class similarto the
//one in UMLView but containing special code to handle the zoom
- UMLWidget *widget = m_pUMLView->testOnWidget(m_pMouseEvent->pos());
+ UMLWidget *widget = m_pUMLView->getWidgetAt(m_pMouseEvent->pos());
if (widget) {
setCurrentWidget(widget);
return;
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #648222:648223
@@ -682,7 +682,7 @@
return 0;
}
-UMLWidget *UMLView::testOnWidget(QPoint p) {
+UMLWidget *UMLView::getWidgetAt(QPoint p) {
int relativeSize = 10000; // start with an arbitrary large number
UMLWidget *obj, *retObj = NULL;
UMLWidgetListIt it(m_WidgetList);
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.h #648222:648223
@@ -875,7 +875,7 @@
* Returns NULL if the point is not inside any widget.
* Does not use or modify the m_pOnWidget member.
*/
- UMLWidget *testOnWidget(QPoint p);
+ UMLWidget *getWidgetAt(QPoint p);
/**
* Initialize and announce a newly created widget.
--- trunk/KDE/kdesdk/umbrello/umbrello/umlwidget.cpp #648222:648223
@@ -708,7 +708,7 @@
m_bSelected = _select;
const QPoint pos(getX(), getY());
- UMLWidget *bkgnd = m_pView->testOnWidget(pos);
+ UMLWidget *bkgnd = m_pView->getWidgetAt(pos);
if (bkgnd && _select) {
kDebug() << "UMLWidget::setSelected: setting Z to "
<< bkgnd->getZ() + 1 << ", SelectState: " << _select << endl;
--- trunk/KDE/kdesdk/umbrello/umbrello/umlwidgetcontroller.cpp #648222:648223
@@ -252,7 +252,7 @@
}
//TODO Copied from old code. Does it really work as intended?
- UMLWidget *bkgnd = m_widget->m_pView->testOnWidget(me->pos());
+ UMLWidget *bkgnd = m_widget->m_pView->getWidgetAt(me->pos());
if (bkgnd) {
//kDebug() << "UMLWidgetController::mouseReleaseEvent: setting Z to "
// << bkgnd->getZ() + 1 << endl;
More information about the umbrello-devel
mailing list