summaryrefslogtreecommitdiff
path: root/cad/src/command_support/Motor_EditCommand.py
blob: 788ed65a530e041ddde7a775d6549a82788f5326 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Copyright 2007-2008 Nanorex, Inc.  See LICENSE file for details.
"""
@author: Ninad
@copyright: 2007-2008 Nanorex, Inc.  See LICENSE file for details.
@version:$Id$

History:
2008-09-09: Moved common code from Rotarymotor and
LinearMotor_EditCommand to here.

TODO:
"""

from command_support.EditCommand import EditCommand
from commands.SelectAtoms.SelectAtoms_GraphicsMode import SelectAtoms_GraphicsMode

_superclass = EditCommand
class Motor_EditCommand(EditCommand):
    """
    Superclass for various Motor edit commands
    """
    __abstract_command_class = True

    #GraphicsMode
    GraphicsMode_class = SelectAtoms_GraphicsMode

    prefix = '' # Not used by jigs.
    # All jigs like rotary and linear motors already created their
    # name, so do not (re)create it from the prefix.
    create_name_from_prefix = False
    propMgr = None

    #See Command.anyCommand for details about the following flags
    command_should_resume_prevMode = True
    command_has_its_own_PM = True

    from utilities.constants import CL_EDIT_GENERIC
    command_level = CL_EDIT_GENERIC




    def command_entered(self):
        """
        Overrides superclass method.
        @see: baseCommand.command_entered()
        """
        self.struct = None
        _superclass.command_entered(self)
        self.o.assy.permit_pick_atoms()