~emihalac/mnemosyne-proj/mnemosyne-proj

« back to all changes in this revision

Viewing changes to mnemosyne/mnemosyne/libmnemosyne/study_mode.py

  • Committer: Peter Bienstman
  • Date: 2017-03-21 18:58:09 UTC
  • Revision ID: peter.bienstman@ugent.be-20170321185809-4pd9slxfin1y1l8t
Bug fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
            component.activate()
35
35
        self.component_manager.current_study_mode = self
36
36
       
37
 
    def activate(self):   
 
37
    def activate(self):
 
38
        Component.activate(self)
38
39
        self.activate_components()
39
40
        self.review_controller().reset()
40
41
        
41
42
    def deactivate(self):
42
43
        print("dectivate study mode", self)
 
44
        Component.deactivate(self)
43
45
        self.scheduler().deactivate()
44
46
        self.component_manager.unregister(self.scheduler())
45
47
        self.review_controller().deactivate()
46
48
        self.component_manager.unregister(self.review_controller())
47
 
        for component in self.gui_components:
48
 
            print(component, type(component))
49
 
            if type(component) != type:
50
 
                component.deactivate()
51
 
            self.component_manager.unregister(component)