Commit 874a8ccb authored by Paweł Wegner's avatar Paweł Wegner
Browse files

Cloudbrowser: take focus when media is loading.

parent 368843ef
......@@ -75,8 +75,7 @@ Window::Window(QWidget* player_widget)
connect(this, &Window::hidePlayer, this,
[this]() {
stop();
if (container())
container()->show();
if (container()) container()->show();
},
Qt::QueuedConnection);
connect(this, &Window::runListDirectory, this, [this]() { listDirectory(); },
......@@ -247,6 +246,11 @@ bool Window::goBack() {
void Window::play(int item_id) {
ItemModel* item = directory_model_.get(item_id);
stop();
if (container()) {
// container()->clearFocus() doesn't clear focus
container()->hide();
container()->show();
}
last_played_ = item_id;
item_data_request_ = cloud_provider_->getItemDataAsync(
item->item()->id(), [this](IItem::Pointer i) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment