Commit 3c25c5c5 authored by Camilo Higuita's avatar Camilo Higuita

correct get bug when not getting an image

parent 16c1f2c4
......@@ -70,10 +70,17 @@ QVariantList DBActions::get(const QString &queryTxt)
if(query.record().indexOf(PIX::KEYMAP[key])>-1)
data[PIX::KEYMAP[key]] = query.value(PIX::KEYMAP[key]).toString();
if(PIX::fileExists(data[PIX::KEYMAP[PIX::KEY::URL]].toString()))
auto url =data[PIX::KEYMAP[PIX::KEY::URL]].toString();
if(!url.isEmpty())
{
if(PIX::fileExists(url))
mapList<< data;
else
removePic(data[PIX::KEYMAP[PIX::KEY::URL]].toString());
}else
mapList<< data;
else
removePic(data[PIX::KEYMAP[PIX::KEY::URL]].toString());
}
}else qDebug()<< query.lastError()<< query.lastQuery();
......
......@@ -11,6 +11,7 @@ Row
Maui.ToolButton
{
visible: !pixViewer.holder.visible
iconColor: currentView === views.viewer? accentColor : textColor
iconName: "image"
onClicked: currentView = views.viewer
......
......@@ -39,6 +39,7 @@ Maui.Drawer
ScrollView
{
id: scrollView
clip: true
Layout.fillHeight: true
Layout.fillWidth: true
......@@ -46,8 +47,8 @@ Maui.Drawer
GridLayout
{
width: parent.width
height: parent.height
width: scrollView.availableWidth
height: scrollView.availableHeight
rows: 11
columns: 1
columnSpacing: contentMargins
......@@ -60,6 +61,8 @@ Maui.Drawer
width: parent.width
text: qsTr("Color")
font.pointSize: fontSizes.big
font.weight: Font.Bold
font.bold: true
}
Label
......
......@@ -52,7 +52,6 @@ Maui.Page
iconName: "overflow-menu"
onClicked: viewerMenu.popup()
}
]
headBar.leftContent: Maui.ToolButton
......
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