[Uml-devel] branches/work/soc-umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Fri May 11 17:41:16 UTC 2012
SVN commit 1294248 by fischer:
Differences to trunk reduced.
M +13 -10 umlscene.cpp
M +1 -1 umlscene.h
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1294247:1294248
@@ -1579,7 +1579,7 @@
/**
* Calls setSelected on the given UMLWidget and enters
- * it into the m_SelectedList while making sure it is
+ * it into the m_selectedList while making sure it is
* there only once.
*/
void UMLScene::makeSelected(UMLWidget* uw)
@@ -1631,10 +1631,13 @@
}
/**
- * Paint diagram to the paint device
+ * Returns the PNG picture of the paste operation.
+ * @param rect the area of the diagram to copy
+ * @param diagram the class to store PNG picture of the paste operation.
*/
void UMLScene::getDiagram(const UMLSceneRect &rect, QPixmap & diagram)
{
+ DEBUG(DBG_SRC) << "rect=" << rect << ", pixmap=" << diagram.rect();
QPixmap pixmap(rect.x() + rect.width(), rect.y() + rect.height());
QPainter painter(&pixmap);
getDiagram(sceneRect(), painter);
@@ -2079,7 +2082,7 @@
return false;
}
addItem(pAssoc);
- const Uml::AssociationType assoType = pAssoc->associationType();
+ const Uml::AssociationType assocType = pAssoc->associationType();
if (isPasteOperation) {
IDChangeLog * log = m_doc->changeLog();
@@ -2097,9 +2100,9 @@
idb = m_pIDChangesLog->findNewID(pAssoc->widgetIDForRole(Uml::B));
//if either is still not found and assoc type is anchor
//we are probably linking to a notewidet - else an error
- if (ida == Uml::id_None && assoType == Uml::AssociationType::Anchor)
+ if (ida == Uml::id_None && assocType == Uml::AssociationType::Anchor)
ida = log->findNewID(pAssoc->widgetIDForRole(Uml::A));
- if (idb == Uml::id_None && assoType == Uml::AssociationType::Anchor)
+ if (idb == Uml::id_None && assocType == Uml::AssociationType::Anchor)
idb = log->findNewID(pAssoc->widgetIDForRole(Uml::B));
} else {
Uml::IDType oldIdA = pAssoc->widgetIDForRole(Uml::A);
@@ -2142,8 +2145,8 @@
//make sure valid
if (!isPasteOperation && !m_doc->loading() &&
- !AssocRules::allowAssociation(assoType, pWidgetA, pWidgetB)) {
- uWarning() << "allowAssociation returns false " << "for AssocType " << assoType;
+ !AssocRules::allowAssociation(assocType, pWidgetA, pWidgetB)) {
+ uWarning() << "allowAssociation returns false " << "for AssocType " << assocType;
removeItem(pAssoc);
return false;
}
@@ -4109,7 +4112,7 @@
addItem(assoc);
if (!assoc->loadFromXMI(assocElement)) {
uError() << "could not loadFromXMI association widget:"
- << (void*)assoc << ", bad XMI file? Deleting from umlview.";
+ << assoc << ", bad XMI file? Deleting from umlview.";
delete assoc;
/* return false;
Returning false here is a little harsh when the
@@ -4208,7 +4211,7 @@
m_AssociationList.append(aw);
} else {
uError() << "cannot create assocwidget from ("
- << (void*)wA << ", " << (void*)wB << ")";
+ << wA << ", " << wB << ")";
}
break;
}
@@ -4255,7 +4258,7 @@
if (tag == "uisDiagramName") {
setName(elem.text());
if (ulvi)
- ulvi->setText(0, name());
+ ulvi->setText(name());
} else if (tag == "uisDiagramStyle") {
QString diagramStyle = elem.text();
if (diagramStyle != "ClassDiagram") {
--- branches/work/soc-umbrello/umbrello/umlscene.h #1294247:1294248
@@ -4,7 +4,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * copyright (C) 2002-2011 *
+ * copyright (C) 2002-2012 *
* Umbrello UML Modeller Authors <uml-devel at uml.sf.net> *
***************************************************************************/
More information about the umbrello-devel
mailing list