Skip to content

Commit

Permalink
Simplified composerView function
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@13331 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 20, 2010
1 parent 0603c45 commit 03855f5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gui/qgscomposerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ void QgsComposerView::sendItemRemovedSignal( QgsComposerItem* item )

QMainWindow* QgsComposerView::composerWindow()
{
QObject* composerObject = 0;
QMainWindow* composerObject = 0;
QObject* currentObject = parent();
if ( !currentObject )
{
Expand All @@ -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 03855f5

Please sign in to comment.