Skip to content

Commit

Permalink
Fix for issue #622
Browse files Browse the repository at this point in the history
Column names now forced to 'Spelling' and 'Transcription'
  • Loading branch information
jsmackie committed Nov 29, 2016
1 parent 6462d70 commit 1cfc102
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 6 additions & 0 deletions corpustools/gui/iogui.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ def typeChanged(self):
elif type_ in ['buckeye','timit']:
t = 'multiple'
self.pathWidget.updateType(t)

self.inspect()

def help(self):
Expand Down Expand Up @@ -777,9 +778,13 @@ def updateColumnFrame(self, atts):
for a in reversed(atts):
ignorable = self.textType not in ['spelling','transcription']
c = AnnotationTypeWidget(a, ignorable = ignorable)
if not ignorable:# self.textType in ['spelling', 'transcription']:
print(c.nameWidget.text())
c.nameWidget.setEnabled(False)
self.columns.append(c)
self.columnFrame.layout().insertWidget(0, c)


set_default_trans = False
set_default_spell = False
for c in reversed(self.columns):
Expand All @@ -792,6 +797,7 @@ def updateColumnFrame(self, atts):
if set_default_spell and set_default_trans:
break


def generateKwargs(self):
path = self.pathWidget.value()
if path == '':
Expand Down
2 changes: 0 additions & 2 deletions corpustools/gui/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,6 @@ def punctuationChanged(self):

class AnnotationTypeWidget(QGroupBox):
def __init__(self, annotation_type, parent = None, ignorable = True):
#if title is None:
# title = 'Annotation type details'
QGroupBox.__init__(self, annotation_type.name, parent)

main = QHBoxLayout()
Expand Down

0 comments on commit 1cfc102

Please sign in to comment.