Skip to content
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

Merged
merged 1 commit into from Jul 30, 2013
Merged

- fix #7926 #776

merged 1 commit into from Jul 30, 2013

Conversation

vmora
Copy link
Contributor

@vmora vmora commented Jul 29, 2013

  • the painting is ended if image cannot be allocated in renderer

- 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() )
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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.

Copy link
Member

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.

NathanW2 added a commit that referenced this pull request Jul 30, 2013
@NathanW2 NathanW2 merged commit 812d1ed into qgis:master Jul 30, 2013
@vmora vmora deleted the issue7926 branch January 25, 2014 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants