a
    §ˆc|	  ã                   @   s@   d dl mZ d dlmZmZmZ ddlmZ G dd„ deƒZdS )é    )ÚAction)ÚAnyÚCallableÚInstanceé   )ÚICommandStackc                   @   s4   e Zd ZdZeƒ ZeeƒZe	ƒ Z
dd„ Zdd„ ZdS )ÚCommandActionz«The CommandAction class is an Action class that wraps undo/redo
    commands.  It is only useful for commands that do not take any arguments or
    return any result.
    c                 C   s   | j  | j| jd�¡ dS )z]This is reimplemented to push a new command instance onto the
        command stack.
        )ÚdataN)Úcommand_stackÚpushÚcommandr	   )ÚselfÚevent© r   úd/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/undo/action/command_action.pyÚperform5   s    zCommandAction.performc                 C   s   | j r|   ¡ j}nd}|S )z- This gets the action name from the command. Ú )r   Úname)r   r   r   r   r   Ú_name_default<   s    zCommandAction._name_defaultN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r
   r   r	   r   r   r   r   r   r   r      s   r   N)	Zpyface.action.apir   Z
traits.apir   r   r   Zi_command_stackr   r   r   r   r   r   Ú<module>   s   