Commit 028ef6c0 authored by camilo higuita's avatar camilo higuita

model fixes on delegates

parent e8b8472c
......@@ -888,10 +888,9 @@ Maui.ApplicationWindow
onArtworkDoubleClicked:
{
var query = Q.GET.albumTracks_.arg(
searchView.searchTable.model.get(
searchView.list.get(
index).album)
query = query.arg(searchView.searchTable.model.get(
index).artist)
query = query.arg(searchView.list.get(index).artist)
mainPlaylist.list.clear()
mainPlaylist.list.sortBy = Tracks.NONE
......@@ -966,7 +965,11 @@ Maui.ApplicationWindow
Layout.topMargin: Maui.Style.space.small
Layout.bottomMargin: Maui.Style.space.big
onIconClicked: _contextMenu.popup()
onExitClicked: clear()
onExitClicked:
{
root.selectionMode = false
clear()
}
SelectionBarMenu
{
......
......@@ -322,7 +322,7 @@ BabeList
currentIndex = index
if(selectionMode)
{
H.addToSelection(listView.model.get(listView.currentIndex))
H.addToSelection(list.get(listView.currentIndex))
return
}
......@@ -364,10 +364,10 @@ BabeList
function saveList()
{
var trackList = []
if(model.count > 0)
if(listView.count > 0)
{
for(var i = 0; i < model.count; ++i)
trackList.push(model.get(i).url)
for(var i = 0; i < list.count; ++i)
trackList.push(list.get(i).url)
playlistDialog.tracks = trackList
playlistDialog.open()
......@@ -378,10 +378,10 @@ BabeList
{
var trackList = []
if(model.count > 0)
if(listView.count > 0)
{
for(var i = 0; i < model.count; ++i)
trackList.push(model.get(i))
for(var i = 0; i < listView.count; ++i)
trackList.push(list.get(i))
Player.queueTracks(trackList)
}
......@@ -390,7 +390,7 @@ BabeList
function goToAlbum()
{
root.currentView = viewsIndex.albums
var item = listView.model.get(listView.currentIndex)
var item = list.get(listView.currentIndex)
albumsView.populateTable(item.album, item.artist)
contextMenu.close()
}
......@@ -398,7 +398,7 @@ BabeList
function goToArtist()
{
root.currentView = viewsIndex.artists
var item = listView.model.get(listView.currentIndex)
var item = list.get(listView.currentIndex)
artistsView.populateTable(undefined, item.artist)
contextMenu.close()
}
......
......@@ -101,13 +101,11 @@ BabeGrid
parent: parent
maxHeight: maxWidth
maxWidth: Maui.Style.unit * 600
widthHint: 1
heightHint: 1
widthHint: 0.9
heightHint: 0.9
defaultButtons: false
page.padding: 0
// verticalAlignment: Qt.AlignBottom
ColumnLayout
{
id: albumFilter
......
Markdown is supported
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