[Uml-devel] KDE/kdesdk/umbrello/umbrello
Andi Fischer
andi.fischer at hispeed.ch
Mon Sep 24 21:54:59 UTC 2012
SVN commit 1317630 by fischer:
Attribute m_scene removed.
M +10 -4 umlview.cpp
M +0 -1 umlview.h
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.cpp #1317629:1317630
@@ -27,13 +27,18 @@
*/
UMLView::UMLView(UMLFolder *parentFolder)
: QGraphicsView(UMLApp::app()->mainViewWidget()),
- m_scene(new UMLScene(parentFolder, this)),
m_nZoom(100)
{
setAcceptDrops(true);
setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform);
- setDragMode(NoDrag);
- setScene(m_scene);
+ setDragMode(NoDrag); //:TODO: RubberBandDrag);
+ // [PORT] For now the following is used. Shd check for creation of
+ // new scene later.
+ UMLScene *scene = new UMLScene(parentFolder, this);
+ setScene(scene);
+ setSceneRect(scene->sceneRect());
+
+ DEBUG_REGISTER(DBG_SRC);
}
/**
@@ -46,10 +51,11 @@
/**
* Getter for the scene.
+ * TODO: Should be removed. Use scene() instead.
*/
UMLScene* UMLView::umlScene() const
{
- return m_scene;
+ return static_cast<UMLScene*>(scene());
}
/**
--- trunk/KDE/kdesdk/umbrello/umbrello/umlview.h #1317629:1317630
@@ -58,7 +58,6 @@
void setCenter(const QPointF& centerPoint);
QPointF center();
- UMLScene *m_scene; ///< pointer to scene
QPointF m_currentCenterPoint; ///< holds the current centerpoint for the view, used for panning and zooming
QPoint m_lastPanPoint; ///< from panning the view
int m_nZoom; ///< zoom level in percent, default 100
More information about the umbrello-devel
mailing list