--- a/iaupdate/IAD/ui/src/iaupdatenodefilter.cpp Fri Jun 11 13:45:18 2010 +0300
+++ b/iaupdate/IAD/ui/src/iaupdatenodefilter.cpp Wed Jun 23 18:20:02 2010 +0300
@@ -72,6 +72,7 @@
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::~CIAUpdateNodeFilter() begin");
delete iFilterParams;
+ iStoredNodes.Reset();
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::~CIAUpdateNodeFilter() end");
}
@@ -421,7 +422,80 @@
IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::SetDependenciesSelectedL() end");
}
+// -----------------------------------------------------------------------------
+// CIAUpdateNodeFilter::StoreNodeListL
+//
+// -----------------------------------------------------------------------------
+//
+void CIAUpdateNodeFilter::StoreNodeListL( const RPointerArray< MIAUpdateNode >& aNodes )
+ {
+ IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::StoreNodeListL() begin");
+ iStoredNodes.Reset();
+ for( TInt i = 0; i < aNodes.Count(); ++i )
+ {
+ iStoredNodes.AppendL( aNodes[i] );
+ }
+ IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::StoreNodeListL() end");
+ }
+// -----------------------------------------------------------------------------
+// CIAUpdateNodeFilter::RestoreNodeListL
+//
+// -----------------------------------------------------------------------------
+//
+void CIAUpdateNodeFilter::RestoreNodeListL( RPointerArray< MIAUpdateNode >& aNodes) const
+ {
+ IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::RestoreNodeListL() begin");
+ aNodes.Reset();
+ for( TInt i = 0; i < iStoredNodes.Count(); ++i )
+ {
+ aNodes.AppendL( iStoredNodes[i] );
+ }
+ IAUPDATE_TRACE("[IAUPDATE] CIAUpdateNodeFilter::RestoreNodeListL() end");
+ }
+
+// -----------------------------------------------------------------------------
+// CIAUpdateNodeFilter::SortSelectedNodesFirstL
+//
+// -----------------------------------------------------------------------------
+//
+void CIAUpdateNodeFilter::SortSelectedNodesFirstL(
+ const RPointerArray<MIAUpdateNode>& aSelectedNodes,
+ RPointerArray< MIAUpdateNode >& aNodes )
+ {
+ for ( TInt i = aNodes.Count() - 1 ; i >= 0 ; --i )
+ {
+ MIAUpdateNode* node( aNodes[ i ] );
+ if ( node->Base().IsSelected() )
+ {
+ aNodes.Remove( i );
+ }
+ }
+ for ( TInt j = aSelectedNodes.Count() -1 ; j >= 0 ; --j )
+ {
+ aNodes.InsertL( aSelectedNodes[j], 0 );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CIAUpdateNodeFilter::SortThisNodeFirstL
+//
+// -----------------------------------------------------------------------------
+//
+void CIAUpdateNodeFilter::SortThisNodeFirstL( const MIAUpdateNode* aFirstNode,
+ RPointerArray< MIAUpdateNode >& aNodes)
+ {
+ TBool removed = EFalse;
+ for ( TInt i = aNodes.Count() - 1 ; i >= 0 && !removed ; --i )
+ {
+ if ( aNodes[ i ] == aFirstNode )
+ {
+ aNodes.Remove( i );
+ removed = ETrue;
+ }
+ }
+ aNodes.InsertL( aFirstNode, 0 );
+ }
// -----------------------------------------------------------------------------