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

model fixes on delegates

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