Ignore:
Timestamp:
04/15/17 12:32:05 (7 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

All data is displayed and is editable in the PIREP editor (re #307)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/info.py

    r620 r833  
    5454        return (frame, comments)
    5555
    56     def __init__(self, gui):
     56    def __init__(self, gui, mainInstance = True):
    5757        """Construct the flight info tab."""
    5858        super(FlightInfo, self).__init__()
    5959        self._gui = gui
     60        self._mainInstance = mainInstance
    6061
    6162        self._commentsAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
     
    110111                                            buffer.get_end_iter(), True))
    111112
     113    @comments.setter
     114    def comments(self, comments):
     115        """Set the comments."""
     116        self._comments.get_buffer().set_text(comments)
     117
    112118    @property
    113119    def hasComments(self):
     
    147153        self._faultExplainWidget.clearFault(id)
    148154
     155    def setExplanation(self, id, explanation):
     156        """Set the explanation of the given fault."""
     157        self._faultExplainWidget.setExplanation(id, explanation)
     158
    149159    def enable(self, aircraftType):
    150160        """Enable the flight info tab."""
     
    168178        self._delayCodeTable.reset()
    169179
     180    def activateDelayCode(self, code):
     181        """Active the checkbox corresponding to the given code."""
     182        self._delayCodeTable.activateCode(code)
     183
    170184    def delayCodesChanged(self):
    171185        """Callewd when the delay codes have changed."""
    172         self._gui.delayCodesChanged()
     186        if self._mainInstance:
     187            self._gui.delayCodesChanged()
    173188
    174189    def _commentsChanged(self, textbuffer):
    175190        """Called when the comments have changed."""
    176         self._gui.commentsChanged()
     191        if self._mainInstance:
     192            self._gui.commentsChanged()
    177193
    178194    def _faultExplanationsChanged(self, faultExplainWidget, fullyExplained):
    179195        """Called when the status of the fault explanations has changed."""
    180         self._gui.faultExplanationsChanged()
     196        if self._mainInstance:
     197            self._gui.faultExplanationsChanged()
Note: See TracChangeset for help on using the changeset viewer.