}
m_active = active;
+ m_selectionModel->clearSelection();
QColor color = KColorScheme(QPalette::Active, KColorScheme::View).background().color();
if (active) {
const KUrl viewPropsUrl = viewPropertiesUrl();
ViewProperties props(viewPropsUrl);
props.setViewMode(m_mode);
-
createView();
// the file item delegate has been recreated, apply the current
emit categorizedSortingChanged();
}
- loadDirectory(viewPropsUrl);
-
emit modeChanged();
}
void DolphinView::showHoverInformation(const KFileItem& item)
{
- if (hasSelection()) {
+ if (hasSelection() || !m_active) {
return;
}
void DolphinView::clearHoverInformation()
{
- emit requestItemInfo(KFileItem());
+ if (m_active) {
+ emit requestItemInfo(KFileItem());
+ }
}
view->setItemDelegate(m_fileItemDelegate);
view->setModel(m_proxyModel);
- if(m_selectionModel)
- view->setSelectionModel(m_selectionModel);
- else
+ if (m_selectionModel != 0) {
+ view->setSelectionModel(m_selectionModel);
+ } else {
m_selectionModel = view->selectionModel();
+ }
m_selectionModel->setParent(this); //Reparent the selection model. We do not want it to be deleted when we delete the model