<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem with Undo when using COLOR field in a description resource]]></title><description><![CDATA[<p dir="auto">I've encountered an odd problem when a plugin has a COLOR field in a description and Undo (Ctrl-Z) is hit after changing the colour.</p>
<p dir="auto">The attached archive contains a small ObjectData plugin called 'Diamond' to demonstrate this (Windows only, debug build). If you install it then invoke it from the Extensions menu, you see it generates a simple polygon object. There are three parameters - height, width and colour.</p>
<p dir="auto">To reproduce the problem, change either the height or width parameter to anything. Then, click the 'Color' coloured rectangle and in the colour dialog box change the colour to anything. The object colour changes as expected. Close the dialog, then hit Ctrl-Z to undo the colour change. The colour changes back, but also undoes the previous parameter change to width or height. In fact, if you didn't change anything other than the colour, then hit undo, the object is deleted. It's almost as if the effect is to undo two levels on the undo stack rather than one.</p>
<p dir="auto">At first I thought this must be the code I used to change the colour (it's just a call to BaseObject::SetColorProperties()) but not so. Because, if instead of clicking the coloured rectangle you expand the COLOR field to show the colour sliders, you can change the colour using the sliders and undo works normally You can also modify the source so the object colour is not changed at all and the problem still occurs.</p>
<p dir="auto">Unless I'm missing something really obvious this looks like a possible bug in the colour picker dialog implementation. (N.B. the full plugin source code is included in the archive.)</p>
<p dir="auto">Steve</p>
<p dir="auto"><a href="%5B%5Berror:parse-error%5D%5D" target="_blank" rel="noopener noreferrer nofollow ugc">Diamond.zip</a></p>
]]></description><link>http://developers.maxon.net/forum/topic/16430/problem-with-undo-when-using-color-field-in-a-description-resource</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Jul 2026 10:20:57 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16430.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Jul 2026 13:54:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with Undo when using COLOR field in a description resource on Wed, 15 Jul 2026 15:17:42 GMT]]></title><description><![CDATA[<p dir="auto">Apologies - the file upload to my original post doesn't seem to have worked. I tried a different link but that was deleted for some reason. Here's another attempt. You can download the file from my site <a href="https://www.microbion.co.uk/_temp2/diamond.zip" target="_blank" rel="noopener noreferrer nofollow ugc">using this link</a>.</p>
<p dir="auto">Hopefully that has worked!<br />
Steve</p>
]]></description><link>http://developers.maxon.net/forum/post/77253</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77253</guid><dc:creator><![CDATA[spedler]]></dc:creator><pubDate>Wed, 15 Jul 2026 15:17:42 GMT</pubDate></item></channel></rss>