Skip to content

Commit d189ae1

Browse files
committed
fixing mouse double click; when in playback, double-clicking a different station will start it
1 parent 46ff54d commit d189ae1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pyradio/radio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3706,10 +3706,10 @@ def _handle_main_window_mouse_event(self, my, mx, a_button):
37063706
or a_button & curses.BUTTON1_TRIPLE_CLICKED:
37073707
if logger.isEnabledFor(logging.DEBUG):
37083708
if a_button & curses.BUTTON1_DOUBLE_CLICKED:
3709-
logger.debug('Mouse button 1 double click on line {0} with start pos {1} and selection {2}'.format(my, self.startPos, self.selection))
3709+
logger.debug('Mouse button 1 double click on line {0} with start pos {1}, selection {2} and playing = {3}'.format(my, self.startPos, self.selection, self.playing))
37103710
else:
3711-
logger.debug('Mouse button 1 triple click on line {0} with start pos {1} and selection {2}'.format(my, self.startPos, self.selection))
3712-
if self.player.isPlaying() and not do_update:
3711+
logger.debug('Mouse button 1 triple click on line {0} with start pos {1}, selection {2} and playing = {3}'.format(my, self.startPos, self.selection, self.playing))
3712+
if self.player.isPlaying() and self.selection == self.playing:
37133713
self.stopPlayer(show_message=True)
37143714
else:
37153715
self.playSelection()

0 commit comments

Comments
 (0)