Skip to content

Commit

Permalink
complain if regroot is bad
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferis committed Apr 15, 2015
1 parent 4ec2cd4 commit 924aaf8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CMTK_Registration_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,17 @@
class RegRootListener(TextListener):
def textValueChanged(self, tvc):
regroot = regrootf.getText()
if len(regroot)>0 and os.path.exists(regroot):
if len(regroot)==0:
statusf.setText('')
return
if os.path.exists(regroot):
regrootf.setForeground(Color.black)
updateOuputFolders()
else:
regrootf.setForeground(Color.red)
statusf.setText('Please choose valid root directory')
statusf.setForeground(Color.red)
return
imgdir = os.path.join(regroot,'images')
if os.path.exists(imgdir):
imgdirf.setText(imgdir)
Expand Down

0 comments on commit 924aaf8

Please sign in to comment.