<table><tr><td style="">poboiko added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D15637">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Can this potentially throw off the order of items or cause items to be removed that got inserted previously (ID clash?)?</p></blockquote>

<p>As far as I can see, it should not be the case: those two operations should be totally interchangeable.<br />
Both "insert/update" and "remove" actions are based on <tt style="background: #ebebeb; font-size: 13px;">rootItem.children</tt> (which contains new layout of menu). Menu items that are inside it got updated, those who are not - got removed.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>I can see the menu sometimes flickering showing that it briefly has more actions than it used to be. Reproducible in Krita's "Window" menu when using title bar menu button and interacting with the menu. After a while it also crashes.</p></blockquote>

<p>Thanks for the testing! <br />
By "crashing" you mean literally application crashing or just menu gets closed? I was able to reproduce it (the second option) on LyX with title bar menu button; apparently, its behavior is somewhat different from the plasma applet. Will look into it.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Perhaps we should could do this only if the menu would become empty when removing the actions?</p></blockquote>

<p>We can. But my wild guess is that there will be probably also some flickering, but the other way around (i.e. briefly show it has fewer actions).<br />
Actually, I don't see how we can avoid it.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D15637">https://phabricator.kde.org/D15637</a></div></div><br /><div><strong>To: </strong>poboiko, Plasma, broulik, davidedmundson<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>