Fixed some mistakes pertaining to Pesterchum's inheritance structure.

This commit is contained in:
karxi 2016-12-22 11:19:16 -05:00
parent b264498956
commit 0b36b45ddb
3 changed files with 5 additions and 3 deletions

View file

@ -276,7 +276,7 @@ class PesterMovie(QtGui.QMovie):
class PesterText(QtGui.QTextEdit):
def __init__(self, theme, parent=None):
QtGui.QTextEdit.__init__(self, parent)
super(PesterText, self).__init__(parent)
if hasattr(self.parent(), 'mainwindow'):
self.mainwindow = self.parent().mainwindow
else:

View file

@ -244,7 +244,7 @@ _ctag_begin = re.compile(r'<c=(.*?)>')
class MemoText(PesterText):
def __init__(self, theme, parent=None):
super(MemoText, self).__init__(parent)
super(MemoText, self).__init__(theme, parent)
if hasattr(self.parent(), 'mainwindow'):
self.mainwindow = self.parent().mainwindow
else:

View file

@ -888,7 +888,9 @@ class chumArea(RightClickTree):
class trollSlum(chumArea):
def __init__(self, trolls, mainwindow, parent=None):
super(trollSlum, self).__init__(parent)
#~super(trollSlum, self).__init__(parent)
# TODO: Rework inheritance here.
QtGui.QTreeWidgetItem.__init__(self, parent)
self.mainwindow = mainwindow
theme = self.mainwindow.theme
self.setStyleSheet(theme["main/trollslum/chumroll/style"])