def update_nseg(self):
        """Update the number of segments, displayed in the dialog."""
        self.nseg = 0
        if self.one_grp:
            segments = self.get_segments()

            if segments is not None:
                self.nseg = len(segments)
                self.show_nseg.setText('Number of segments: ' + str(self.nseg))
                times = [t for seg in segments for t in seg['times']]
                self.parent.overview.mark_poi(times)

            else:
                self.show_nseg.setText('No valid segments')

        self.toggle_freq()
def update_nseg ( self ) : self . nseg = 0 if self . one_grp : segments = self . get_segments ( ) if segments is not None : self . nseg = len ( segments ) self . show_nseg . setText ( 'Number of segments: ' + str ( self . nseg ) ) times = [ t for seg in segments for t in seg [ 'times' ] ] self . parent . overview . mark_poi ( times ) else : self . show_nseg . setText ( 'No valid segments' ) self . toggle_freq ( )
Update the number of segments, displayed in the dialog.