Skip to content

Commit 1fff70e

Browse files
author
mhugent
committedSep 30, 2009
Some cleanups in composer map and disable a recent change in composer that may lead to segfaults on some systems
git-svn-id: http://svn.osgeo.org/qgis/trunk@11736 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 59a486b commit 1fff70e

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed
 

‎src/app/composer/qgscomposer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ void QgsComposer::open( void )
303303
void QgsComposer::paintEvent( QPaintEvent* event )
304304
{
305305
QMainWindow::paintEvent( event );
306+
#if 0 //MH: disabled for now as there are segfaults on some systems
306307
//The cached content of the composer maps need to be recreated it is the first paint event of the composer after reading from XML file.
307308
//Otherwise the resolution of the composer map is not suitable for screen
308309
if ( mFirstPaint )
@@ -313,12 +314,13 @@ void QgsComposer::paintEvent( QPaintEvent* event )
313314
QgsComposerMap* cm = dynamic_cast<QgsComposerMap*>( it.key() );
314315
if ( cm )
315316
{
317+
mFirstPaint = false;
316318
cm->cache();
317319
cm->update();
318320
}
319321
}
320-
mFirstPaint = false;
321322
}
323+
#endif //0
322324
}
323325

324326
void QgsComposer::activate()

‎src/core/composer/qgscomposermap.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,6 @@ void QgsComposerMap::paint( QPainter* painter, const QStyleOptionGraphicsItem* i
252252

253253

254254
painter->restore();
255-
256-
mLastScaleFactorX = currentScaleFactorX;
257255
}
258256

259257
void QgsComposerMap::updateCachedImage( void )
@@ -542,12 +540,6 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const
542540
}
543541
composerMapElem.appendChild( layerSetElem );
544542

545-
#if 0
546-
// why is saving the map changing anything about the cache?
547-
mCacheUpdated = false;
548-
mNumCachedLayers = 0;
549-
#endif
550-
551543
elem.appendChild( composerMapElem );
552544
return _writeXML( composerMapElem, doc );
553545
}

‎src/core/composer/qgscomposermap.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,6 @@ class CORE_EXPORT QgsComposerMap : /*public QWidget, private Ui::QgsComposerMapB
181181
/** \brief set to true if in state of drawing. Concurrent requests to draw method are returned if set to true */
182182
bool mDrawing;
183183

184-
/**Store last scale factor to avoid unnecessary repaints in case preview mode is 'Render'*/
185-
double mLastScaleFactorX;
186-
187-
/**Store the last map extent to decide if cache needs to be updatet*/
188-
QgsRectangle mCachedMapExtent;
189-
190184
/**Offset in x direction for showing map cache image*/
191185
double mXOffset;
192186
/**Offset in y direction for showing map cache image*/

0 commit comments

Comments
 (0)
Please sign in to comment.