Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2030 Playlist Editor Double-Click Channel Start #2031

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2023 Dennis Sheirer
* Copyright (C) 2014-2024 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -142,6 +142,17 @@ public void dispose()
{
}

/**
* Starts the current channel when the play button is not disabled.
*/
public void startChannel()
{
if(!getPlayButton().disabledProperty().get())
{
getPlayButton().fire();
}
}

public abstract DecoderType getDecoderType();

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.input.MouseButton;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
Expand Down Expand Up @@ -504,6 +505,12 @@ else if(!c2.getFrequencyList().isEmpty())
mChannelTableView.setItems(sortedList);
mChannelTableView.getSelectionModel().selectedItemProperty()
.addListener((observable, oldValue, newValue) -> setChannel(newValue));
mChannelTableView.setOnMouseClicked(event -> {
if(event.getButton().equals(MouseButton.PRIMARY) && event.getClickCount() == 2)
{
getChannelConfigurationEditor().startChannel();
}
});
}

return mChannelTableView;
Expand Down
Loading