Page MenuHome

Fix T93274: Assigning asset catalog doesn't mark file as modified
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Nov 25 2021, 1:45 PM.

Details

Summary

Assigning a catalog to an asset via drag-and-drop in the asset browser
didn't tag the blend file as modified, even though this is information
that's stored in the blend file.

This patch adds a call to ED_undo_push() so that not only the blend file is marked as modified, but also the catalog assignment can be undone.

Diff Detail

Repository
rB Blender

Event Timeline

Sybren A. Stüvel (sybren) requested review of this revision.Nov 25 2021, 1:45 PM
Sybren A. Stüvel (sybren) created this revision.
  • Push an undo step when dragging asset to catalog. This requires passing the context to on-drop functions.
Sybren A. Stüvel (sybren) edited the summary of this revision. (Show Details)
  • Do ED_undo_push after the data modification, not before. Also this ensures a single undo push is done (instead of one per modified asset).
This revision is now accepted and ready to land.Nov 25 2021, 2:54 PM