Ignore:
Timestamp:
03/14/22 10:04:06 (3 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

At most 4 delay codes can be selected (re #357)

File:
1 edited

Legend:

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

    r999 r1035  
    337337    def _delayCodesChanged(self, button):
    338338        """Called when one of the delay codes have changed."""
     339        numDelayCodes = len(self.delayCodes)
     340        if numDelayCodes>=4:
     341            for checkButton in self._checkButtons:
     342                if not checkButton.get_active():
     343                    checkButton.set_sensitive(False)
     344        else:
     345            for checkButton in self._checkButtons:
     346                checkButton.set_sensitive(True)
     347
    339348        self._info.delayCodesChanged()
    340349
Note: See TracChangeset for help on using the changeset viewer.