From b6d16fc0d90268d928b7f58fd2a7836a970deebb Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 5 Jul 2011 08:04:31 +0000 Subject: [PATCH] PRECOS issue 0000552: Highlighting objects in 2D view --- src/GraphicsView/GraphicsView_ViewPort.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/GraphicsView/GraphicsView_ViewPort.cxx b/src/GraphicsView/GraphicsView_ViewPort.cxx index f7d995c38..6a91d58a3 100644 --- a/src/GraphicsView/GraphicsView_ViewPort.cxx +++ b/src/GraphicsView/GraphicsView_ViewPort.cxx @@ -259,8 +259,9 @@ GraphicsView_ObjectList GraphicsView_ViewPort::getObjects( bool theIsSortSelecte { GraphicsView_ObjectList aList; QListIterator anIter( items() ); - while( anIter.hasNext() ) - if( GraphicsView_Object* anObject = dynamic_cast( anIter.next() ) ) + anIter.toBack(); // objects created later should be put to the result list first + while( anIter.hasPrevious() ) + if( GraphicsView_Object* anObject = dynamic_cast( anIter.previous() ) ) { if( theIsSortSelected && anObject->isSelected() ) aList.prepend( anObject ); // put the selected objects to a head of the list -- 2.39.2