Hi Wayne,

On 11/29/2017 06:35 PM, Wayne Stambaugh wrote:
[snip]>> KIGFX::VIEW* view =  s_PcbEditFrame->GetGalCanvas()->GetView();
>> item->MethodThatModifiesTheItemState();
>> view->Update( item );
> 
> Is this safe?  What happens when pcbnew is using the legacy canvas?

This is safe as long as view != nullptr, which normally is true.
VIEW::Update() is a lightweight method that only marks VIEW_ITEMs as
dirty, so they are updated the next time VIEW is drawn. When legacy
canvas is active, VIEW_ITEMs are marked as dirty and never refreshed,
nothing more happens.

Regards,
Orson

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

Reply via email to