mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
bugfix show Player when clic source
This commit is contained in:
@@ -305,11 +305,12 @@ void UserInterface::handleKeyboard()
|
||||
}
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_P )) {
|
||||
// Media player
|
||||
Settings::application.widget.media_player = !Settings::application.widget.media_player;
|
||||
if (Settings::application.widget.media_player_view != Settings::application.current_view) {
|
||||
Settings::application.widget.media_player_view = -1;
|
||||
Settings::application.widget.media_player = true;
|
||||
}
|
||||
sourcecontrol.setVisible(!Settings::application.widget.media_player);
|
||||
// Settings::application.widget.media_player = !Settings::application.widget.media_player;
|
||||
// if (Settings::application.widget.media_player_view != Settings::application.current_view) {
|
||||
// Settings::application.widget.media_player_view = -1;
|
||||
// Settings::application.widget.media_player = true;
|
||||
// }
|
||||
}
|
||||
else if (ImGui::IsKeyPressed( GLFW_KEY_A )) {
|
||||
if (shift_modifier_active)
|
||||
@@ -1690,7 +1691,7 @@ void UserInterface::showSourceEditor(Source *s)
|
||||
if (s) {
|
||||
Mixer::manager().setCurrentSource( s );
|
||||
if (s->playable()) {
|
||||
Settings::application.widget.media_player = true;
|
||||
sourcecontrol.setVisible(true);
|
||||
sourcecontrol.resetActiveSelection();
|
||||
return;
|
||||
}
|
||||
@@ -2488,6 +2489,15 @@ void SourceController::resetActiveSelection()
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SourceController::setVisible(bool on)
|
||||
{
|
||||
if (on && Settings::application.widget.media_player_view != Settings::application.current_view)
|
||||
Settings::application.widget.media_player_view = -1;
|
||||
|
||||
Settings::application.widget.media_player = on;
|
||||
}
|
||||
|
||||
bool SourceController::Visible() const
|
||||
{
|
||||
return ( Settings::application.widget.media_player
|
||||
|
||||
Reference in New Issue
Block a user