-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
- fix #7926 #776
- fix #7926 #776
Conversation
vmora
commented
Jul 29, 2013
- the painting is ended if image cannot be allocated in renderer
@@ -463,6 +463,13 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale ) | |||
QgsDebugMsg( "Caching enabled but layer redraw forced by extent change or empty cache" ); | |||
QImage * mypImage = new QImage( mRenderContext.painter()->device()->width(), | |||
mRenderContext.painter()->device()->height(), QImage::Format_ARGB32 ); | |||
if ( mypImage->isNull() ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we tell the user that it's a memory issue? I don't like the idea of just not doing anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On 30/07/2013 00:57, Nathan Woodrow wrote:
In src/core/qgsmaprenderer.cpp:
@@ -463,6 +463,13 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
QgsDebugMsg( "Caching enabled but layer redraw forced by extent change or empty cache" );
QImage * mypImage = new QImage( mRenderContext.painter()->device()->width(),
mRenderContext.painter()->device()->height(), QImage::Format_ARGB32 );
if ( mypImage->isNull() )
Should we tell the user that it's a memory issue? I don't like the
idea of just not doing anything.—
Reply to this email directly or view it on GitHub
https://github.com/qgis/Quantum-GIS/pull/776/files#r5464414.The message the user will get is "Memory Allocation Error" from
src/app/qgscomposer.cpp. I agree that the error message should be
created where the error is detected, but I couldn't find any error
handling mechanism in the maprenderer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On 30/07/2013 08:22, Nathan Woodrow wrote:
In src/core/qgsmaprenderer.cpp:
@@ -463,6 +463,13 @@ void QgsMapRenderer::render( QPainter* painter, double* forceWidthScale )
QgsDebugMsg( "Caching enabled but layer redraw forced by extent change or empty cache" );
QImage * mypImage = new QImage( mRenderContext.painter()->device()->width(),
mRenderContext.painter()->device()->height(), QImage::Format_ARGB32 );
if ( mypImage->isNull() )
Do you mean this
https://github.com/qgis/Quantum-GIS/blob/master/src/app/composer/qgscomposer.cpp#L978?—
Reply to this email directly or view it on GitHub
https://github.com/qgis/Quantum-GIS/pull/776/files#r5469270.Yes, this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok that's fine. We should really change that into a message bar error rather then a message box but that is not part of this pull request.