Hey Ivica,
Thanks for the patch. Its good to see your still probing the GOP bugs, it would be awesome to get the GOP working solidly, but its some tough stuff to get thru. Hopefully your energy will spread to me a bit, I tried a bunch but got discouraged.
My understanding of your change is that the "for (g = x->gl_list; g; g = g->g_next)" loop should just be eliminated, since the code you added would basically mean that within "if (!nogoprect && !x->gl_goprect)" x->gl_goprect would always be set to 1.
I tried a bunch of tests but I couldn't see any difference besides with the red rectangle appearing when no objects are present on the GOP canvas. Do you have any example patches and/or bug reports that you are referring to?
For future reference, please post patches with only the necessary changes, and do not include any formatting changes. This makes it much easier to read the patches. I attached a reformatted version of your patch for an example.
.hc
On May 16, 2010, at 6:15 PM, Ivica Ico Bukvic wrote:
The attached patch fixes following bugs in both extended and vanilla 0.42.5 Pd:
*hidetext GOP property not being saved properly with the patch *stale object drawn when gop is turned off while gop-ed patcher is open *random crashes that result from the former misbehavior *gop-ed patchers now save properties to the saved file using the new gop format (as defined in the g_readwrite.c), rather than old pre-0.38 format
Synopsis: Basically x->gl_goprect = 1; in g_editor.c is never reached when the gop-ed patcher has no elements in it. Added if statement checks if g_list is empty and adjusts accordingly.
Cheers!
Ico
<g_editor_patch_100516>
----------------------------------------------------------------------------
You can't steal a gift. Bird gave the world his music, and if you can hear it, you can have it. - Dizzy Gillespie