if ( aDestinationIndex >= 0 && aDestinationIndex < myObjects.count() ) {
int aDestinationRow = isInsertBefore ? aDestinationIndex : aDestinationIndex + 1;
if ( beginMoveRows( QModelIndex(), theItem, theItem, QModelIndex(), aDestinationRow ) ) {
+ myPrevObjects = myObjects;
myObjects.move( theItem, aDestinationIndex );
endMoveRows();
aRes = true;
void HYDROGUI_ListModel::setDecorationEnabled( const bool theIsToEnable )
{
myIsDecorationEnabled = theIsToEnable;
-}
\ No newline at end of file
+}
+
+void HYDROGUI_ListModel::undoLastMove()
+{
+ myObjects = myPrevObjects;
+ reset();
+}