BUG: 156678
FIXED-IN: 20.12
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(container);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(container);
}
Panel::showEvent(event);
}
Panel::showEvent(event);
}
void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos)
}
void PlacesPanel::slotViewContextMenuRequested(const QPointF& pos)
}
QAction *PlacesPanel::buildGroupContextMenu(QMenu *menu, int index)
}
QAction *PlacesPanel::buildGroupContextMenu(QMenu *menu, int index)
-void PlacesPanel::selectClosestItem()
+void PlacesPanel::selectItem()
{
const int index = m_model->closestItem(url());
KItemListSelectionManager* selectionManager = m_controller->selectionManager();
selectionManager->setCurrentItem(index);
selectionManager->clearSelection();
{
const int index = m_model->closestItem(url());
KItemListSelectionManager* selectionManager = m_controller->selectionManager();
selectionManager->setCurrentItem(index);
selectionManager->clearSelection();
- selectionManager->setSelected(index);
+
+ const QUrl closestUrl = m_model->url(index);
+ if (!closestUrl.path().isEmpty() && url() == closestUrl) {
+ selectionManager->setSelected(index);
+ }
}
void PlacesPanel::triggerItem(int index, Qt::MouseButton button)
}
void PlacesPanel::triggerItem(int index, Qt::MouseButton button)
void editEntry(int index);
/**
void editEntry(int index);
/**
- * Selects the item that has the closest URL for the URL set
+ * Selects the item that matches the URL set
* for the panel (see Panel::setUrl()).
*/
* for the panel (see Panel::setUrl()).
*/
- void selectClosestItem();
void triggerItem(int index, Qt::MouseButton button);
void triggerItem(int index, Qt::MouseButton button);