aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorronie <ronie@users.noreply.github.com>2016-12-06 01:07:01 +0100
committerGitHub <noreply@github.com>2016-12-06 01:07:01 +0100
commit3acf8b8d63c3ad168947f633622c64df9eb64349 (patch)
tree77e09631b30648623d3a9bb5556995e601599499
parent9b9dfad82273676ba30be05bd731009f6c94a1e5 (diff)
parent97521b405ff39e5c6d0fc464c186fee573e1b89c (diff)
Merge pull request #11011 from ronie/browsemulti
FileBrowser: fix multiple item selection
-rw-r--r--system/keymaps/remote.xml5
-rw-r--r--xbmc/dialogs/GUIDialogFileBrowser.cpp17
2 files changed, 13 insertions, 9 deletions
diff --git a/system/keymaps/remote.xml b/system/keymaps/remote.xml
index 259265ace2..3c7f68fdeb 100644
--- a/system/keymaps/remote.xml
+++ b/system/keymaps/remote.xml
@@ -145,6 +145,11 @@
<hash>Rename</hash>
</remote>
</FileManager>
+ <FileBrowser>
+ <remote>
+ <zero>Highlight</zero>
+ </remote>
+ </FileBrowser>
<MusicPlaylist>
<remote>
<clear>Delete</clear>
diff --git a/xbmc/dialogs/GUIDialogFileBrowser.cpp b/xbmc/dialogs/GUIDialogFileBrowser.cpp
index 2f96c1f791..f6e002e016 100644
--- a/xbmc/dialogs/GUIDialogFileBrowser.cpp
+++ b/xbmc/dialogs/GUIDialogFileBrowser.cpp
@@ -186,20 +186,19 @@ bool CGUIDialogFileBrowser::OnMessage(CGUIMessage& message)
int iItem = m_viewControl.GetSelectedItem();
int iAction = message.GetParam1();
if (iItem < 0) break;
- if (iAction == ACTION_SELECT_ITEM || iAction == ACTION_MOUSE_LEFT_CLICK)
+ CFileItemPtr pItem = (*m_vecItems)[iItem];
+ if ((iAction == ACTION_SELECT_ITEM || iAction == ACTION_MOUSE_LEFT_CLICK) &&
+ (!m_multipleSelection || pItem->m_bIsShareOrDrive || pItem->m_bIsFolder))
{
OnClick(iItem);
return true;
}
- else if (iAction == ACTION_HIGHLIGHT_ITEM && m_multipleSelection)
+ else if ((iAction == ACTION_HIGHLIGHT_ITEM || iAction == ACTION_MOUSE_LEFT_CLICK || iAction == ACTION_SELECT_ITEM) &&
+ (m_multipleSelection && !pItem->m_bIsShareOrDrive && !pItem->m_bIsFolder))
{
- CFileItemPtr pItem = (*m_vecItems)[iItem];
- if (!pItem->m_bIsShareOrDrive && !pItem->m_bIsFolder)
- {
- pItem->Select(!pItem->IsSelected());
- CGUIMessage msg(GUI_MSG_ITEM_SELECT, GetID(), message.GetSenderId(), iItem + 1);
- OnMessage(msg);
- }
+ pItem->Select(!pItem->IsSelected());
+ CGUIMessage msg(GUI_MSG_ITEM_SELECT, GetID(), message.GetSenderId(), iItem + 1);
+ OnMessage(msg);
}
}
else if (message.GetSenderId() == CONTROL_OK)