From a8a3fa51a0649ffc43b0d740c268e39a6dd6672b Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Fri, 19 Jan 2018 13:37:09 -0300 Subject: Fix place item edit after creation Summary: Make sure that the place can be edited after the creation. Depends on D9333 BUG: 389147 Test Plan: Create an item in dolphin places panel, make sure that you can rename it Reviewers: #dolphin, ngraham Reviewed By: ngraham Subscribers: michaelh, elvisangelaccio, lbeltrame, ngraham, #dolphin Differential Revision: https://phabricator.kde.org/D9985 --- src/panels/places/placesitem.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/panels/places/placesitem.cpp') diff --git a/src/panels/places/placesitem.cpp b/src/panels/places/placesitem.cpp index d7e87cf7a..3c6023ba8 100644 --- a/src/panels/places/placesitem.cpp +++ b/src/panels/places/placesitem.cpp @@ -129,12 +129,15 @@ Solid::Device PlacesItem::device() const void PlacesItem::setBookmark(const KBookmark& bookmark) { - if (bookmark == m_bookmark) { - return; - } + const bool bookmarkDataChanged = !(bookmark == m_bookmark); + // bookmark object must be updated to keep in sync with source model m_bookmark = bookmark; + if (!bookmarkDataChanged) { + return; + } + delete m_access; delete m_volume; delete m_disc; -- cgit v1.3.1