Solving issue 2375: "Partial paste resets (all?) unselected tools the first time it is used"
This commit is contained in:
parent
16a37e73e8
commit
c1b392b492
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user