From c1b392b492bd9c44e48c984017cce6b1f87730f3 Mon Sep 17 00:00:00 2001 From: Hombre Date: Mon, 12 May 2014 21:07:27 +0200 Subject: [PATCH] Solving issue 2375: "Partial paste resets (all?) unselected tools the first time it is used" --- rtgui/profilepanel.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index 70991e121..76cda5090 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -336,7 +336,7 @@ void ProfilePanel::copy_clicked (GdkEventButton* event) { toSave = lastsaved; else { const ProfileStoreEntry* entry = profiles->getSelectedEntry(); - toSave = entry ? profileStore.getProfile (profiles->getSelectedEntry()) : NULL; + toSave = entry ? profileStore.getProfile (entry) : NULL; } // toSave has to be a complete procparams @@ -488,6 +488,16 @@ void ProfilePanel::paste_clicked (GdkEventButton* event) { if (!custom) { custom = new PartialProfile (true); + if (isLastSavedSelected()) { + *custom->pparams = *lastsaved->pparams; + } + else { + const ProfileStoreEntry* entry = profiles->getSelectedEntry(); + if (entry) { + const PartialProfile* partProfile = profileStore.getProfile (entry); + *custom->pparams = *partProfile->pparams; + } + } profiles->set_active (addCustomRow()); currRow = profiles->get_active(); }