Opened 17 years ago

Last modified 13 years ago

#47 new task

Redrawing problems in showimg and designer

Reported by: rudi Owned by: dmik
Priority: normal Milestone:
Component: kernel Version:
Severity: normal Keywords:
Cc:

Description

Both "examples/showimg" and "designer" have drawing problems after certain resize operations. The "showimg" application doesn't erase it's window, when it is enlarged while no image is loaded. This is caused by the flag WResizeNoErase, which is applied to the ImageViewer instance created in main.cpp. While this looks correct in the first place, I've found that the same sample in Windows (I don't have Linux, so I can't compare) does erase the background.

Now the docs state:

WResizeNoErase     obsolete Use WNoAutoErase instead
WRepaintNoErase      obsolete Use WNoAutoErase instead

WNoAutoErase is defined as WResizeNoErase | WRepaintNoErase.

So what is the desired behavior, if WResizeNoErase or WRepaintNoErase are specified alone ? Somehow I have the feeling, that Trolltech at some point made an change in the way these flags should be used and did not update existing source code. IOW, it appears that, erasing of the background should only be omitted, if both flags WResizeNoErase *AND* WRepaintNoErase (i.e. WNoAutoErase) are applied.

If I change line 3493 in src/kernel/qapplication_pm.cpp and line 2004 in src/kernel/qwodget_pm.cpp from:

repaint( !testWFlags(WResizeNoErase) );

to:

repaint( testWFlags(WNoAutoErase) != WNoAutoErase );

I get correct redrawing in both showimg and designer. However, with a little flickering. This is not as bad as the behavior without that change.

Any comments ?

Attachments (1)

Designer.png (105.8 KB ) - added by komh 17 years ago.

Download all attachments as: .zip

Change History (3)

by komh, 17 years ago

Attachment: Designer.png added

comment:1 by komh, 17 years ago

Hello Rudiger

I applied your patch, and found that it totally fixed resize problem in Designer without any other degradation. Thank you.

It will be fine if Dmitriy will commit it to QT/2 sources.

comment:2 by rudi, 13 years ago

Applied in r195

Note: See TracTickets for help on using tickets.