Fix (unreported): crash on undo when using pinned id in spreadsheet
Now the behavior is the same as in the properties editor, as far as I can tell.
This commit is contained in:
parent
fade765bf3
commit
d4d03f736b
|
@ -24,7 +24,7 @@ class SPREADSHEET_OT_toggle_pin(bpy.types.Operator):
|
|||
'''Turn on or off pinning'''
|
||||
bl_idname = "spreadsheet.toggle_pin"
|
||||
bl_label = "Toggle Pin"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
bl_options = {'REGISTER'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
|
|
|
@ -2985,6 +2985,12 @@ static void lib_link_workspace_layout_restore(struct IDNameLib_Map *id_map,
|
|||
|
||||
sclip->scopes.ok = 0;
|
||||
}
|
||||
else if (sl->spacetype == SPACE_SPREADSHEET) {
|
||||
SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)sl;
|
||||
|
||||
sspreadsheet->pinned_id = restore_pointer_by_name(
|
||||
id_map, sspreadsheet->pinned_id, USER_IGNORE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue