summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Sims <mark@nanorex.com>2008-12-19 22:13:47 +0000
committerMark Sims <mark@nanorex.com>2008-12-19 22:13:47 +0000
commit7fc5bb75bc20f677c729d6eaed7e25ea5284e8cb (patch)
treedecf92a2854285f0471889f6baf20901aa9b851c
parenta4f5a63aa18ffec8c2535d3d24bdf3bac4585981 (diff)
downloadnanoengineer-7fc5bb75bc20f677c729d6eaed7e25ea5284e8cb.tar.gz
nanoengineer-7fc5bb75bc20f677c729d6eaed7e25ea5284e8cb.zip
Minor refinements to docstrings and comments.
-rw-r--r--cad/src/dna/DnaSequenceEditor/DnaSequenceEditor.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/cad/src/dna/DnaSequenceEditor/DnaSequenceEditor.py b/cad/src/dna/DnaSequenceEditor/DnaSequenceEditor.py
index d702a568e..36c6c016b 100644
--- a/cad/src/dna/DnaSequenceEditor/DnaSequenceEditor.py
+++ b/cad/src/dna/DnaSequenceEditor/DnaSequenceEditor.py
@@ -308,7 +308,10 @@ class DnaSequenceEditor(Ui_DnaSequenceEditor):
return
def _updateSequenceBgColor(self):
-
+ """
+ Updates the sequence field background color
+ (pink = changed, white = unchanged).
+ """
if self._sequence_changed:
bgColor = sequenceEditorChangedColor
else:
@@ -317,7 +320,8 @@ class DnaSequenceEditor(Ui_DnaSequenceEditor):
palette = getPalette(None,
QPalette.Base,
bgColor)
- self.sequenceTextEdit.setPalette(palette)
+ self.sequenceTextEdit.setPalette(palette)
+ return
def getPlainSequence( self, inOmitSymbols = False ):
"""
@@ -733,8 +737,8 @@ class DnaSequenceEditor(Ui_DnaSequenceEditor):
This is the main (public) method to call to update the sequence editor.
- @param strand: the strand. If strand is None (default), it is assumed
- that self.current_strand is the sequence.
+ @param strand: the strand. If strand is None (default), update the
+ sequence of the current strand (i.e. self.current_strand).
@type strand: DnaStrand
@param cursorPos: the position in the sequence in which to place the
@@ -792,10 +796,9 @@ class DnaSequenceEditor(Ui_DnaSequenceEditor):
self.show()
return
- def setCursorPosition(self, cursorPos = 0):
+ def setCursorPosition(self, cursorPos = -1):
"""
- Set the cursor position to I{cursorPos} in the strand sequence
- textedit widget.
+ Set the cursor position to I{cursorPos} in the sequence textedit widget.
@param cursorPos: the position in the sequence in which to place the
cursor. If cursorPos is negative, the cursor position
@@ -803,7 +806,6 @@ class DnaSequenceEditor(Ui_DnaSequenceEditor):
@type cursorPos: int
"""
-
# Make sure cursorPos is in the valid range.
if cursorPos < 0:
startPos = self.getSequenceLength()