Paste elements
From TaskDepender
(Created page with "''This page describes the possibility to paste a certain number of cut elements.'' == Introduction == == Design == To be able to paste a number of elements that were previousl...") |
|||
Line 1: | Line 1: | ||
− | ''This page describes the possibility to paste a certain number of | + | ''This page describes the possibility to paste a certain number of elements.'' |
== Introduction == | == Introduction == | ||
+ | |||
+ | Once a number of elements are [[Cut selected elements|cut]] from the current container, the view can be changed to another container at which the cut elements can be placed. The following describes how this is implemented. | ||
== Design == | == Design == | ||
Line 12: | 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 19: | 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 35: | Line 40: | ||
task = task->next(); | task = task->next(); | ||
} | } | ||
+ | |||
+ | // -- Find deliverables on 'clipboard' -- | ||
DeliverableC* deliverable = DeliverablesAdmin->First(); | DeliverableC* deliverable = DeliverablesAdmin->First(); | ||
Line 41: | 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 ) | ||
Line 54: | Line 62: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
+ | ---- | ||
+ | * [[Cut selected elements]] |