Skip to content
Permalink
Browse files

Simplified composerView function

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13331 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Apr 20, 2010
1 parent 3b60d78 commit 708dc7c53895713959c33fd4bb379eb0c955e962
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/gui/qgscomposerview.cpp
@@ -607,7 +607,7 @@ void QgsComposerView::sendItemRemovedSignal( QgsComposerItem* item )

QMainWindow* QgsComposerView::composerWindow()
{
QObject* composerObject = 0;
QMainWindow* composerObject = 0;
QObject* currentObject = parent();
if ( !currentObject )
{
@@ -616,14 +616,14 @@ QMainWindow* QgsComposerView::composerWindow()

while ( true )
{
if ( currentObject->parent() == 0 )
composerObject = qobject_cast<QMainWindow*>( currentObject );
if ( composerObject || currentObject->parent() == 0 )
{
composerObject = currentObject;
break;
return composerObject;
}
currentObject = currentObject->parent();
}

return qobject_cast<QMainWindow *>( composerObject );
return 0;
}

0 comments on commit 708dc7c

Please sign in to comment.
You can’t perform that action at this time.