-// Copyright (C) 2013-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
myIsOnTop( false ),
myIsHighlighted( false ),
myIsSelected( false ),
- myIsMoving( false )
+ myIsMoving( false ),
+ myIsMovable( true )
{
}
//=======================================================================
GraphicsView_Object::~GraphicsView_Object()
{
- QListIterator<QGraphicsItem*> aChildIter( children() );
+ QListIterator<QGraphicsItem*> aChildIter( childItems() );
while( aChildIter.hasNext() )
{
if( QGraphicsItem* aChild = aChildIter.next() )
//================================================================
void GraphicsView_Object::move( double theDX, double theDY, bool theIsAtOnce )
{
+ if( !myIsMovable )
+ return;
+
if( theIsAtOnce )
{
finishMove( true );