Action* ActionMoveResize::apply()
{
    ActionMoveResize* undo = NULL;
    
    DiagramItem* item = NULL;
    
    if (m_revertItemID != -1)
        item = m_pItemCollector->getItemByID( m_revertItemID);
    
    if (item == NULL)
        return NULL;
    
    if (m_pPosAndSize != NULL)
    {
        undo = new ActionMoveResize (m_pItemCollector, item, item->getPosAndSize());
        item->setPosAndSize(m_pPosAndSize);
        
        // update box connections
        DiagramBox *box = dynamic_cast<DiagramBox*> (item);
        
        if (box != 0)
        {
            box->updateConnections();
            
            // item is a DiagramBox, action with DiagramBox have high priority
            undo->setHightPriority( false);
        }
    }
    
    return undo;
}