Ignore:
Timestamp:
05/03/12 18:27:13 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Implemented FS time synchronization

File:
1 edited

Legend:

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

    r147 r148  
    699699            self._simulator = fs.createSimulator(const.SIM_MSFS9, self)
    700700            fs.setupMessageSending(self.config, self._simulator)
    701 
     701            self._setupTimeSync()
     702       
    702703        self._flight.simulator = self._simulator
    703704
     
    853854        """Callback for editing the preferences."""
    854855        self._preferences.run(self.config)
     856        self._setupTimeSync()
     857
     858    def _setupTimeSync(self):
     859        """Enable or disable the simulator time synchronization based on the
     860        configuration."""
     861        simulator = self._simulator
     862        if simulator is not None:
     863            if self.config.syncFSTime:
     864                simulator.enableTimeSync()
     865            else:
     866                simulator.disableTimeSync()
Note: See TracChangeset for help on using the changeset viewer.