[FrameSvgItem] Don't create unneccessary nodes
ClosedPublic

Authored by broulik on Dec 3 2017, 11:13 AM.

Details

Summary

If a border isn't enabled there's no point in creating a node for it

Test Plan

Borders still look fine also when they change. When enabled borders change we throw away the entire node anyway.

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Dec 3 2017, 11:13 AM
Restricted Application added projects: Plasma, Frameworks. · View Herald TranscriptDec 3 2017, 11:13 AM
Restricted Application added subscribers: Frameworks, plasma-devel. · View Herald Transcript
broulik requested review of this revision.Dec 3 2017, 11:13 AM

Are you sure you've checked enabled borders changing at runtime?

if it changes oldNode is still set, so we don't go through this again.

We just (and this could be changed) update the nodes in that case.

davidedmundson accepted this revision.Dec 3 2017, 11:29 AM

Edit: I was wrong.

This revision is now accepted and ready to land.Dec 3 2017, 11:29 AM
This revision was automatically updated to reflect the committed changes.