[Uml-devel] branches/work/soc-umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Tue May 22 18:13:27 UTC 2012
SVN commit 1296139 by fischer:
Differences to trunk reduced.
M +3 -6 umlscene.cpp
M +2 -1 umlviewimageexporter.cpp
M +6 -4 umlviewimageexportermodel.cpp
--- branches/work/soc-umbrello/umbrello/umlscene.cpp #1296138:1296139
@@ -2095,7 +2095,6 @@
Uml::IDType ida = Uml::id_None, idb = Uml::id_None;
if (type() == DiagramType::Collaboration || type() == DiagramType::Sequence) {
//check local log first
-
ida = m_pIDChangesLog->findNewID(pAssoc->widgetIDForRole(Uml::A));
idb = m_pIDChangesLog->findNewID(pAssoc->widgetIDForRole(Uml::B));
//if either is still not found and assoc type is anchor
@@ -2331,7 +2330,6 @@
void UMLScene::removeAllAssociations()
{
//Remove All association widgets
-
foreach(AssociationWidget* assocwidget, m_AssociationList) {
removeAssoc(assocwidget);
}
@@ -2360,10 +2358,9 @@
removeWidget(temp);
}
}
- // Porting to QList from QPtrList which doesn't support autodelete
- //m_WidgetList.clear();
- qDeleteAll(m_AssociationList);
- m_AssociationList.clear();
+
+ qDeleteAll(m_WidgetList);
+ m_WidgetList.clear();
}
/**
--- branches/work/soc-umbrello/umbrello/umlviewimageexporter.cpp #1296138:1296139
@@ -71,7 +71,8 @@
// export the view
app->document()->writeToStatusBar(i18n("Exporting view..."));
- QString error = UMLViewImageExporterModel().exportView(m_scene,
+ UMLViewImageExporterModel theExporter;
+ QString error = theExporter.exportView(m_scene,
UMLViewImageExporterModel::mimeTypeToImageType(m_imageMimeType), m_imageURL);
if (!error.isNull()) {
KMessageBox::error(app, i18n("An error happened when exporting the image:\n") + error);
--- branches/work/soc-umbrello/umbrello/umlviewimageexportermodel.cpp #1296138:1296139
@@ -508,13 +508,15 @@
return false;
}
- bool exportSuccessful;
UMLSceneRect rect = scene->diagramRect();
QPixmap diagram(rect.width(), rect.height());
scene->getDiagram(rect, diagram);
- exportSuccessful = diagram.save(fileName, qPrintable(imageType.toUpper()));
-
- DEBUG(DBG_IEM) << "saving to file " << fileName << " , imageType=" << imageType << " successful=" << exportSuccessful;
+ bool exportSuccessful = diagram.save(fileName, qPrintable(imageType.toUpper()));
+ DEBUG(DBG_IEM) << "saving to file " << fileName
+ << " , imageType=" << imageType
+ << " , width=" << rect.width()
+ << " , height=" << rect.height()
+ << " , successful=" << exportSuccessful;
return exportSuccessful;
}
More information about the umbrello-devel
mailing list