From: ouv Date: Tue, 5 Jul 2011 08:04:31 +0000 (+0000) Subject: PRECOS issue 0000552: Highlighting objects in 2D view X-Git-Tag: DIAGRAM_1_0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b6d16fc0d90268d928b7f58fd2a7836a970deebb;p=modules%2Fgui.git PRECOS issue 0000552: Highlighting objects in 2D view --- 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