Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 41200618 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Only reassign renamed profile's shortcut if old profile is deleted.

Patch by ahmadsamir

Differential Revision: https://phabricator.kde.org/D9339
parent 87642c93
......@@ -430,8 +430,10 @@ void ProfileManager::changeProfile(Profile::Ptr profile,
if (oldProfile->path() == origPath) {
// assign the same shortcut of the old profile to
// the newly renamed profile
setShortcut(newProfile, shortcut(oldProfile));
deleteProfile(oldProfile);
const auto oldShortcut = shortcut(oldProfile);
if (deleteProfile(oldProfile)) {
setShortcut(newProfile, oldShortcut);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment