AGW Thumbnailctrl ZeroDivisionError in OnPaint when AUI Pane FlyOut

Error when minimized and Flies out. Didn’t crash, but needs a fix.

Situation: Thumbnailer is in an AUI Pane and is minimized with FlyOut Capabilities(Preview Pane)

···

Traceback (most recent call last):
File “C:\Python27\lib\site-packages\wx-3.0-msw\wx\lib\agw\thumbnailctrl.py”, line 2145, in OnPaint
xwhite = ((w - self._cols*(self._tWidth + self._tBorder)))/(self._cols+1)
ZeroDivisionError: integer division or modulo by zero

Hi,

···

On 9 February 2014 14:56, Metallicow wrote:

Error when minimized and Flies out. Didn’t crash, but needs a fix.

Situation: Thumbnailer is in an AUI Pane and is minimized with FlyOut Capabilities(Preview Pane)

Traceback (most recent call last):
File “C:\Python27\lib\site-packages\wx-3.0-msw\wx\lib\agw\thumbnailctrl.py”, line 2145, in OnPaint
xwhite = ((w - self._cols*(self._tWidth + self._tBorder)))/(self._cols+1)

ZeroDivisionError: integer division or modulo by zero

I have applied a small patch to the Classic version of ThumbnailCtrl, can you please try and see if it is fixed? If it is, I’ll port it to Phoenix, otherwise I will need a simple sample app to reproduce and fix this issue.

Thank you!

You received this message because you are subscribed to the Google Groups “wxPython-dev” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://www.infinity77.net

-------------------------------------------------------------

def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
    send_message(email)
else:

    install_malware()
    erase_hard_drives()

-------------------------------------------------------------

Yep, that fixed it. :slight_smile:

···

On Sunday, February 9, 2014 8:01:29 AM UTC-6, Infinity77 wrote:

Hi,

On 9 February 2014 14:56, Metallicow wrote:

Error when minimized and Flies out. Didn’t crash, but needs a fix.

Situation: Thumbnailer is in an AUI Pane and is minimized with FlyOut Capabilities(Preview Pane)

Traceback (most recent call last):
File “C:\Python27\lib\site-packages\wx-3.0-msw\wx\lib\agw\thumbnailctrl.py”, line 2145, in OnPaint
xwhite = ((w - self._cols*(self._tWidth + self._tBorder)))/(self._cols+1)

ZeroDivisionError: integer division or modulo by zero

I have applied a small patch to the Classic version of ThumbnailCtrl, can you please try and see if it is fixed? If it is, I’ll port it to Phoenix, otherwise I will need a simple sample app to reproduce and fix this issue.

Thank you!

You received this message because you are subscribed to the Google Groups “wxPython-dev” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxPython-dev...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://www.infinity77.net

-------------------------------------------------------------

def ask_mailing_list_support(email):

if mention_platform_and_version() and include_sample_app():
    send_message(email)
else:

    install_malware()
    erase_hard_drives()

-------------------------------------------------------------

if self._cols <= 0:
self._cols = 1

Also, would It be easy enough to integrate a way that I can mouse out to the preview pane and use it without it starting to slide back in?
…basically a usable popout preview pane, that would slide back in if I am not over the button or the preview pane…
It seams to be tied to the small bitmap, but not the underlying minimizetoolbar housing the 16px bitmap.