Resource loading
Boudewijn Rempt
boud at valdyas.org
Mon Aug 23 17:13:12 CEST 2004
On Monday 23 August 2004 15:01, Boudewijn Rempt wrote:
> To keep things consistent, it would be best to load the resources once, and
> create new instances of each resource for each new view, a bit like what I
> intend to do to make the tools into kparts.
Okay, I've solved this the most bone-headed way possible: I've pulled
KisResourceServer from the KisFactory and made it an attribute of KisView.
The result is consistent with the design that all aspects of a view are owned
by that view, including tool settings (and thus also resource settings).
But it is silly to load all those files every time we open a new view, even a
new view on the same document. Perhaps resources shouldn't have state and
load the resources only once, or perhaps we should deep-copy all resources
for a new view, or copy only the state records, and use the resources
themselves across all views.
But that can wait: for now a bug is solved, and optimizations and clean-ups
can wait until I have found energy and courage to finish the selections code.
More information about the kimageshop
mailing list