Conversation
Fix overflow error when clicking on the zoomed out preview or rapidly clicking on individual lines.
|
Are you sure that this is correct? |
|
I'm not certain that this is the best solution but it certainly seems to get rid of the errors while not breaking the functionality, at least in the testing I have done. As I understand it, we want the line number of the selected segment, which is the value of 'names[0]', to highlight the line in the Gcode window. The default buffer size is 100 and unless I'missing something, which is very much possible, I don't see why we would need to enlarge the buffer at all as we can only highlight the one line in the gcode. |
|
I would suggest this: try:
buffer = glRenderMode(GL_RENDER)
except OverflowError:
self.select_buffer_size *= 2
continue
+ except OpenGL.error.GLError as e:
+ if e.err == GL_STACK_OVERFLOW:
+ self.select_buffer_size *= 2
+ continue
break |
|
Still kind of begs the question as to why we would want to ingest hundreds or even thousands of segments to then only pick out a single one of them. |
|
Feel free to submit a better solution, if you think of one. |
Fix overflow error when clicking on the zoomed out preview or rapidly clicking on individual lines.