From 2454104346d45ca8f963e72171f479739c408bab Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Mon, 30 Apr 2018 23:24:32 +0200 Subject: [PATCH] Small bug fixes for Salt Package manager Download URL's and documentation URL's have not been shown properly in the package preview. --- src/lay/lay/laySaltGrainDetailsTextWidget.cc | 2 +- src/lay/lay/laySaltManagerDialog.cc | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lay/lay/laySaltGrainDetailsTextWidget.cc b/src/lay/lay/laySaltGrainDetailsTextWidget.cc index 0536a50ef..2a0eeccae 100644 --- a/src/lay/lay/laySaltGrainDetailsTextWidget.cc +++ b/src/lay/lay/laySaltGrainDetailsTextWidget.cc @@ -278,7 +278,7 @@ SaltGrainDetailsTextWidget::details_text () if (! g->url ().empty ()) { stream << "

" << QObject::tr ("Download URL: ") << "" << tl::to_qstring (tl::escaped_to_html (g->url ())) << "

"; } - if (! g->installed_time ().isNull ()) { + if (! g->path ().empty () && ! g->installed_time ().isNull ()) { stream << "

" << QObject::tr ("Installed: ") << "" << g->installed_time ().toString () << "

"; } if (! g->dependencies ().empty ()) { diff --git a/src/lay/lay/laySaltManagerDialog.cc b/src/lay/lay/laySaltManagerDialog.cc index f8115ed7d..c6d4c5f34 100644 --- a/src/lay/lay/laySaltManagerDialog.cc +++ b/src/lay/lay/laySaltManagerDialog.cc @@ -1005,7 +1005,10 @@ SaltManagerDialog::data_ready () return; } + // Load the grain file (save URL as it is overwritten by the grain.xml content) + std::string url = m_downloaded_grain->url (); m_downloaded_grain->load (*m_downloaded_grain_reader); + m_downloaded_grain->set_url (url); try {