Ensure character tabs are disabled when no valid character is selected

Previously if a character was selected, and next
  either:  a title (Main, Secondary, Minor) was selected,
      or:  the character remove button was clicked,
then the character tabs would remain enabled.  This was incorrect
behaviour.

In the case a character was removed and the user moved the
importance slider then Manuskript would crash.

This enhancement disables the character tabs when there is no valid
character selected.
This commit is contained in:
Curtis Gedak 2017-06-30 16:21:00 -06:00
parent dedf5fb27a
commit 8fe282e484

View file

@ -156,7 +156,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
"""
c = self.lstCharacters.currentCharacter()
if not c:
self.tabPlot.setEnabled(False)
self.tabPersos.setEnabled(False)
return
self.tabPersos.setEnabled(True)