]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/infosidebarpage.cpp
reactivate ScrollPerPixel again, as the Qt-patch for "divide by zero" has been applie...
[dolphin.git] / src / infosidebarpage.cpp
index b1dee423fb1ab063df084775554feb6011287316..319582cb495e5d1773c715786388d72fa90c19c8 100644 (file)
@@ -121,6 +121,12 @@ void InfoSidebarPage::setUrl(const KUrl& url)
 void InfoSidebarPage::setSelection(const QList<KFileItem>& selection)
 {
     SidebarPage::setSelection(selection);
+    if (selection.size() == 1) {
+        const KUrl url = selection.first().url();
+        if (!url.isEmpty()) {
+            m_urlCandidate = url;
+        }
+    }
     m_timer->start(TimerDelay);
 }
 
@@ -186,7 +192,7 @@ void InfoSidebarPage::showItemInfo()
                                            K3Icon::SizeEnormous);
         m_preview->setPixmap(icon);
         m_nameLabel->setText(i18ncp("@info", "%1 item selected", "%1 items selected", selectedItems.count()));
-    } else if (!applyBookmark(file)) {
+    } else if (!applyPlace(file)) {
         // try to get a preview pixmap from the item...
         KUrl::List list;
         list.append(file);
@@ -226,7 +232,7 @@ void InfoSidebarPage::slotTimeout()
 void InfoSidebarPage::showIcon(const KFileItem& item)
 {
     m_pendingPreview = false;
-    if (!applyBookmark(item.url())) {
+    if (!applyPlace(item.url())) {
         m_preview->setPixmap(item.pixmap(K3Icon::SizeEnormous));
     }
 }
@@ -241,7 +247,7 @@ void InfoSidebarPage::showPreview(const KFileItem& item,
     }
 }
 
-bool InfoSidebarPage::applyBookmark(const KUrl& url)
+bool InfoSidebarPage::applyPlace(const KUrl& url)
 {
     KFilePlacesModel* placesModel = DolphinSettings::instance().placesModel();
     int count = placesModel->rowCount();