[Clam-devel] Copy & Paste processings on canvas patch
nolaiz at gmail.com
Tue Jun 10 09:23:43 PDT 2008
El 06/10/2008 01:06 PM, David García Garzón escribió:
> El Tuesday 10 June 2008 17:32:40 Natanael Olaiz va escriure:
>> El 06/10/2008 07:31 AM, Pau Arumí Albó escribió:
>>> El dt 10 de 06 de 2008 a les 06:53 -0300, en/na Natanael Olaiz va
>>>> El 06/10/2008 06:03 AM, Pau Arumí Albó escribió:
>>>> Well, in the processing adapter I putted a check line to don't store the
>>>> new attributes if are not given, but any check on the load... since it
>>>> works good reading a file with or without the new attributes. I don't
>>>> think it would affect other uses (i.e. the backwards compatibility
>>>> wouldn't be affected).
>>>> The major problem as it's now is if you load a network with the
>>>> attributes, it will fill the _processingsBoxesAttributes map. So, I send
>>>> here a new patch for Network.cxx that clear it every time you do a load,
>>>> to avoid fill all the memory if you load so much times without clear it.
>>>> Do you think it's a problem that _processingsBoxesAttributes could be
>>>> non-empty without using it?
>>> Er yes could lead to potential problems. We don't want duplicated
>>> information and the original info sits in the canvas, so let's use it
>>> when loading and saving and keep it clean the rest of the time.
>> David: help! :)
>> The only solution that occurs to me is using a toggle attribute like
>> setPasteMode. But since this wouldn't be used only for paste but loading
>> files... should I add another?
>> I don't like it... but it's the only idea that comes to my mind to solve
> Sorry i lost the context, could you explain better the problem?
Hot to don't let Network::_processingsBoxesAttributes get filled
everytime you do a Network::LoadFrom, which makes that if you don't
clean with a Network::getBoxesAttributes() it's remains filled with that
values since the next LoadFrom or StoreOn.
How can I know when to fill it and when not? Since these attributes will
be used for saving and loading files too, I can't use setPasteMode....
More information about the clam-devel