Re: [Qgis-developer] QgsMapCanvas::paintEvent() too frequent

2014-01-17 Thread Radim Blazek
More observations.

When mouse enters the map canvas, first 10 (unwanted?) paintEvents
are caused by QEvent::HoverMove. Following QEvent::HoverMove events
are not causing additional paintEvents.

Single QEvent::HoverLeave is followed by 10 paintEvents (QEvent::Paint
- Screen update necessary).

QEvent::WindowActivate (restore) is also followed by 10 additional (11
in total) paintEvents().

Setting stylesheet, for example: setStyleSheet(:hover
{background-color: #ff;});
increases the number of paintEvents to 20.

Radim

On Thu, Jan 16, 2014 at 8:53 PM, Radim Blazek radim.bla...@gmail.com wrote:
 QgsMapCanvas::paintEvent() is called too frequently on my X11, for example:
 - 11 times when mouse enters map canvas (if QGIS does not have focus)
 - 10 times when mouse leaves map canvas
 - 13 times when minimized QGIS is restored
 etc.

 Does anybody know why and how it could be reduced?

 Radim
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


Re: [Qgis-developer] QgsMapCanvas::paintEvent() too frequent

2014-01-17 Thread Tim Sutton
Hi

I doesn't actually redraw the map ten times though does it? It doesn't seem
to for me

Regards

Tim


On Fri, Jan 17, 2014 at 1:09 PM, Radim Blazek radim.bla...@gmail.comwrote:

 More observations.

 When mouse enters the map canvas, first 10 (unwanted?) paintEvents
 are caused by QEvent::HoverMove. Following QEvent::HoverMove events
 are not causing additional paintEvents.

 Single QEvent::HoverLeave is followed by 10 paintEvents (QEvent::Paint
 - Screen update necessary).

 QEvent::WindowActivate (restore) is also followed by 10 additional (11
 in total) paintEvents().

 Setting stylesheet, for example: setStyleSheet(:hover
 {background-color: #ff;});
 increases the number of paintEvents to 20.

 Radim

 On Thu, Jan 16, 2014 at 8:53 PM, Radim Blazek radim.bla...@gmail.com
 wrote:
  QgsMapCanvas::paintEvent() is called too frequently on my X11, for
 example:
  - 11 times when mouse enters map canvas (if QGIS does not have focus)
  - 10 times when mouse leaves map canvas
  - 13 times when minimized QGIS is restored
  etc.
 
  Does anybody know why and how it could be reduced?
 
  Radim
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




-- 
Tim Sutton - QGIS Project Steering Committee Member
==
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Irc: timlinux on #qgis at freenode.net
==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] QgsMapCanvas::paintEvent() too frequent

2014-01-17 Thread Radim Blazek
On Fri, Jan 17, 2014 at 9:22 PM, Tim Sutton li...@linfiniti.com wrote:
 Hi

 I doesn't actually redraw the map ten times though does it? It doesn't seem
 to for me

It does not redraw the map but QgsMapCanvasMap does repaint cached,
previously rendered, mPixmap. That is probably fast (takes some time
anyway), but there are also all QgsMapCanvasItems. QgsHighlight for
example, which renders identified feature every time and that can be
heavy (as RĂ©gis pointed out) for complex polygons with thousands of
islands. That is how I came to it.

Radim

 Regards

 Tim


 On Fri, Jan 17, 2014 at 1:09 PM, Radim Blazek radim.bla...@gmail.com
 wrote:

 More observations.

 When mouse enters the map canvas, first 10 (unwanted?) paintEvents
 are caused by QEvent::HoverMove. Following QEvent::HoverMove events
 are not causing additional paintEvents.

 Single QEvent::HoverLeave is followed by 10 paintEvents (QEvent::Paint
 - Screen update necessary).

 QEvent::WindowActivate (restore) is also followed by 10 additional (11
 in total) paintEvents().

 Setting stylesheet, for example: setStyleSheet(:hover
 {background-color: #ff;});
 increases the number of paintEvents to 20.

 Radim

 On Thu, Jan 16, 2014 at 8:53 PM, Radim Blazek radim.bla...@gmail.com
 wrote:
  QgsMapCanvas::paintEvent() is called too frequently on my X11, for
  example:
  - 11 times when mouse enters map canvas (if QGIS does not have focus)
  - 10 times when mouse leaves map canvas
  - 13 times when minimized QGIS is restored
  etc.
 
  Does anybody know why and how it could be reduced?
 
  Radim
 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/qgis-developer




 --
 Tim Sutton - QGIS Project Steering Committee Member
 ==
 Please do not email me off-list with technical
 support questions. Using the lists will gain
 more exposure for your issues and the knowledge
 surrounding your issue will be shared with all.

 Irc: timlinux on #qgis at freenode.net
 ==
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer


[Qgis-developer] QgsMapCanvas::paintEvent() too frequent

2014-01-16 Thread Radim Blazek
QgsMapCanvas::paintEvent() is called too frequently on my X11, for example:
- 11 times when mouse enters map canvas (if QGIS does not have focus)
- 10 times when mouse leaves map canvas
- 13 times when minimized QGIS is restored
etc.

Does anybody know why and how it could be reduced?

Radim
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer