I want to clean this up a bit still, but it seems to work now.
Also includes (to be split off):
* Don't allow renaming assets from the file list for now (e.g. right-click >
Rename).When renaming an ID somewhere in the UI after marking it as asset, This doesn't work yet and I'm not sure it should evenit would often get lost in the Asset Browser (scrolled out of view). If an assetIt would also get deactivated.
is a local data-block it can be renamed in the sidebar.
* Fix broken logic to scroll a preview into viewThis patch makes sure that if an asset is active whose ID gets renamed, it is kept active and visible.
Old code stored the new file-name to identify a file after re-reading the file-list after the rename. For assets that doesn't work because there may be multiple assets with the same name. Here the simple solution of just storing the pointer to the renamed ID is chosen, rather than relying on the file-name in this case. (Should be fine with undo, since the `ID *` reference is short lived, it's not stored over possible undo steps.
* The smooth-scrolling seems to have some issues in master already. Fixing that is a separate thing to do.
* Partially includes D9994. These changes were needed for this to work.