From: CHEMIN Sebastien Date: Mon, 5 Feb 2024 07:55:47 +0000 (+0100) Subject: Base object herits from QGraphicsItem X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ffffa54b82c40fab50e59c618a350a2f130e2455;p=modules%2Fgui.git Base object herits from QGraphicsItem --- diff --git a/src/GraphicsView/GraphicsView_Object.cxx b/src/GraphicsView/GraphicsView_Object.cxx index 17f8cccb8..a13a7241a 100644 --- a/src/GraphicsView/GraphicsView_Object.cxx +++ b/src/GraphicsView/GraphicsView_Object.cxx @@ -27,7 +27,7 @@ // Purpose : Constructor //======================================================================= GraphicsView_Object::GraphicsView_Object( QGraphicsItem* theParent ) -: QGraphicsItemGroup( theParent ), +: QGraphicsItem( theParent ), myPriority( 0 ), myIsOnTop( false ), myIsHighlighted( false ), @@ -48,7 +48,6 @@ GraphicsView_Object::~GraphicsView_Object() { if( QGraphicsItem* aChild = aChildIter.next() ) { - removeFromGroup( aChild ); if( QGraphicsScene* aScene = aChild->scene() ) aScene->removeItem( aChild ); delete aChild; diff --git a/src/GraphicsView/GraphicsView_Object.h b/src/GraphicsView/GraphicsView_Object.h index 0389ba8d1..17d5daef5 100644 --- a/src/GraphicsView/GraphicsView_Object.h +++ b/src/GraphicsView/GraphicsView_Object.h @@ -24,7 +24,7 @@ #include "GraphicsView_Defs.h" -#include +#include class GraphicsView_ViewPort; @@ -32,7 +32,7 @@ class GraphicsView_ViewPort; Class : GraphicsView_Object Description : Base class for all objects displayed at the scene */ -class GRAPHICSVIEW_API GraphicsView_Object : public QGraphicsItemGroup +class GRAPHICSVIEW_API GraphicsView_Object : public QGraphicsItem { public: GraphicsView_Object( QGraphicsItem* theParent = 0 );