summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Smith <bruce@nanorex.com>2008-09-09 16:52:23 +0000
committerBruce Smith <bruce@nanorex.com>2008-09-09 16:52:23 +0000
commite5d5b4c92f01c75dc4e521b6622092e1c5761cb3 (patch)
tree0c79d5eea67d5386722ff7ba11b1f2d16fba0406
parentf386d6bbd9fb20d4210020dda0eaa3741ca0959a (diff)
downloadnanoengineer-theirix-e5d5b4c92f01c75dc4e521b6622092e1c5761cb3.tar.gz
nanoengineer-theirix-e5d5b4c92f01c75dc4e521b6622092e1c5761cb3.zip
rename Node.setAssy -> set_assy to avoid confusion with GLPane.setAssy
-rw-r--r--cad/src/commands/PartLibrary/PartLibrary_Command.py8
-rwxr-xr-xcad/src/foundation/Utility.py7
2 files changed, 7 insertions, 8 deletions
diff --git a/cad/src/commands/PartLibrary/PartLibrary_Command.py b/cad/src/commands/PartLibrary/PartLibrary_Command.py
index 20a0dd24e..1212950d3 100644
--- a/cad/src/commands/PartLibrary/PartLibrary_Command.py
+++ b/cad/src/commands/PartLibrary/PartLibrary_Command.py
@@ -163,7 +163,7 @@ class PartLibrary_Command(PasteFromClipboard_Command):
newMol = hotspotAtom.molecule.copy_single_chunk(None)
# [this can break interchunk bonds,
# thus it still has bug 2028]
- newMol.setAssy(self.o.assy)
+ newMol.set_assy(self.o.assy)
hs = newMol.hotspot
ha = hs.singlet_neighbor() # hotspot neighbor atom
attch2Atom = attch2Singlet.singlet_neighbor() # attach to atom
@@ -203,7 +203,7 @@ class PartLibrary_Command(PasteFromClipboard_Command):
newMol = m.copy_single_chunk(None)
# [this can break interchunk bonds,
# thus it still has bug 2028]
- newMol.setAssy(self.o.assy)
+ newMol.set_assy(self.o.assy)
## Get each of all other chunks' center movement for the
## rotation around 'rotCenter'
@@ -295,7 +295,7 @@ class PartLibrary_Command(PasteFromClipboard_Command):
## for newMol in newnodes:
## # some of the following probably only work for Chunks,
## # though coding them for other nodes would not be hard
-## newMol.setAssy(self.o.assy)
+## newMol.set_assy(self.o.assy)
## newMol.move(moveOffset)
## self.o.assy.addmol(newMol)
## stuff.append(newMol)
@@ -304,7 +304,7 @@ class PartLibrary_Command(PasteFromClipboard_Command):
## #chunks one at a time (bug 2028)
## for m in nodes:
## newMol = m.copy(None) # later: renamed Chunk method to copy_single_chunk -- not sure if this was only called on chunks
-## newMol.setAssy(self.o.assy) #bruce 051227 revised this
+## newMol.set_assy(self.o.assy) #bruce 051227 revised this
##
## newMol.move(moveOffset)
##
diff --git a/cad/src/foundation/Utility.py b/cad/src/foundation/Utility.py
index d393c31b6..013006709 100755
--- a/cad/src/foundation/Utility.py
+++ b/cad/src/foundation/Utility.py
@@ -225,8 +225,7 @@ class Node( StateMixin):
name_msg = " (exception in `self.name`)"
return "<%s at %#x%s>" % (classname, id(self), name_msg)
- def setAssy(self, assy):
- #bruce 051227, Node method [used in depositMode; TODO: rename to avoid confusion with GLPane method]
+ def set_assy(self, assy): #bruce 051227, Node method [used in PartLibrary_Command]
"""
Change self.assy from its current value to assy,
cleanly removing self from the prior self.assy if that is not assy.
@@ -1573,7 +1572,7 @@ class Node( StateMixin):
## self.__dict__.clear() ###k is this safe???
return
- def remove_from_parents(self): #bruce 051227 split this out of Node.kill for use in new Node.setAssy
+ def remove_from_parents(self): #bruce 051227 split this out of Node.kill for use in new Node.set_assy
"""
Remove self from its parents of various kinds
(part, dad, assy, selection) without otherwise altering it.
@@ -1607,7 +1606,7 @@ class Node( StateMixin):
#bruce 060315 comments about this old code:
# reasons to set assy to None:
# - helps avoid cycles when destroying Nodes
- # - logical part of setAssy (but could wait til new assy is stored)
+ # - logical part of set_assy (but could wait til new assy is stored)
# reasons not to:
# - Undo-tracked changes might like to use it to find the right AssyUndoArchive to tell about the change
# (can we fix that by telling it right now? Not sure... in theory, more than one assy could claim it if we Undo in some!)