30.05.2011, 19:54, "Geoffrey Hutchison" <[email protected]>:
> On May 30, 2011, at 11:28 AM, Konstantin Tokarev wrote:
>
>>  https://github.com/annulen/avogadro/commit/a69c045f2f1a192b166a954472dc15d4535c06fd
>>
>>  Probably it should be further polished to reduce code duplication
>
> So I assume when you've done the polish, you'll submit to Gerrit?

You can check right now if everything work as it should do.

>>  Also, maybe it's a good time to fix custom property manipulations.
>>  * We discussed use of QProperties to reduce memory overhead
>>  * I don't like how access to colors is implemented - first I need to check 
>> custom color, than color map, but it would be much more pleasant to have 
>> something like Atom::color() returning actual property value.
>
> I talked with Marcus a while ago about caching colors in the engines, which 
> would also reduce the overhead from custom colors. The idea is that the 
> engine class would get a signal when the molecule changed, check the colors 
> (both custom and normal) and save them in a QList.
>
> I'm not sure about your second point -- Atom::color() only knows a color if 
> it's custom. Otherwise, I could set one color scheme for the Sticks engine 
> (e.g., to reflect partial charge or somesuch) and another for Spheres.

I was thinking about some method which would incapsulate these actions:
1) check if custom color is set;
2) if not, figure out what engine paints this atom (if many - which of them is 
"main", e.g. we should disregard force engine here)
3) get color of atom from that engine

>
> BTW, I think it's probably a good idea for v1.1 to revamp the standard 
> ElementColor class to use its own text file for colors. I think there are a 
> lot of savvy users who might want to use green for carbon or something like 
> this.

I.e. edit global color map - I think that would be useful (also it would be 
useful to have custom global map in each CML file)

-- 
Regards,
Konstantin

------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery, 
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now. 
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Avogadro-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/avogadro-devel

Reply via email to