Paste elements
From TaskDepender
(→Implementation) |
|||
Line 14: | Line 14: | ||
void Admin::Paste(void) | void Admin::Paste(void) | ||
{ | { | ||
− | // Find all elements with container MaxInt and | + | // Find all elements with container MaxInt and are to be placed at the current level. |
SelectedTasksIds->Clear(); | SelectedTasksIds->Clear(); | ||
Line 21: | Line 21: | ||
TaskC *containerTask = TasksAdmin->FindTask(SelectedContainerTaskId); | TaskC *containerTask = TasksAdmin->FindTask(SelectedContainerTaskId); | ||
− | TaskC* task = | + | // -- Find tasks on 'clipboard' -- |
+ | |||
+ | TaskC* task = TasksAdmin->First(); | ||
while( task != NULL ) | while( task != NULL ) | ||
{ | { | ||
if( task->Container == MaxInt ) | if( task->Container == MaxInt ) | ||
{ | { | ||
+ | // Task in clipboard found. | ||
task->Container = SelectedContainerTaskId; | task->Container = SelectedContainerTaskId; | ||
Line 37: | Line 40: | ||
task = task->next(); | task = task->next(); | ||
} | } | ||
+ | |||
+ | // -- Find deliverables on 'clipboard' -- | ||
DeliverableC* deliverable = DeliverablesAdmin->First(); | DeliverableC* deliverable = DeliverablesAdmin->First(); | ||
Line 43: | Line 48: | ||
if( deliverable->Container == MaxInt ) | if( deliverable->Container == MaxInt ) | ||
{ | { | ||
+ | // Deliverable on clipboard found. | ||
deliverable->Container = SelectedContainerTaskId; | deliverable->Container = SelectedContainerTaskId; | ||
if( containerTask != NULL ) | if( containerTask != NULL ) |