Hi there. Not sure if this is a developer issue or a general one with the sotware.
Inside draft environment, when you copy-paste a item (views, textboxes, table, dimensions.. anything which can have an style) from one draft to a new one, all the styles associated with that item are inserted inside the new document. That's fine.
However, when you change the style of the inserted items, so that the copied styles are no longer used, there's no way of deleting those styles. They are no longer used by any element, nor they are parents of other styles and so on, but you can't delete them form the API. All this is taking place in an app Im developing in order to update old drafts over new templates by copying-pasting, which is what we do manually when we need to update things.
To my surprise, manual removal of those styles is also not possible (grayed button when trying to delete), so this seems not to be a API problem.
As soon as you remove the inserted item, the styles can easily be deleted. With all, it seems that the pasted item somehow "retains" the styles attached from the original document, and that attachment remains even after updating the style for new ones, be it manually or automated through the API. I have inspected diferent items in order to try to find any link with the "old" styles, but nothing found, so no idea of what approach.
Not being a big issue, it's quite unelegant having all "historic" styles stored in the files along different updates, and not being able to delete them, which indeeds complicate things for future improvements.
I guess that copy-paste on new templates (at least manually) is quite a common approach when updating drafts, so I guess I won't be the only one experiencing this!
Any info will be really appreciatted! Thanks in advance!
p.s. I have posted this on the general SE forum, along with further info I have obtained from my researchs: