Skip to content

Commit

Permalink
Ensure Composer set to zoomFull() when shown from menu or manager
Browse files Browse the repository at this point in the history
- Zoom full happens on initial showing or showing after hiding, via user close or spontaneously by os
- If Composer is open, behind other windows or minimized, zoom state is maintained
  • Loading branch information
dakcarto committed Dec 11, 2012
1 parent 9461431 commit 489a9d5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,10 +445,15 @@ void QgsComposer::open( void )

void QgsComposer::activate()
{
bool shown = isVisible();
show();
raise();
setWindowState( windowState() & ~Qt::WindowMinimized );
activateWindow();
if ( !shown )
{
on_mActionZoomAll_triggered();
}
}

#ifdef Q_WS_MAC
Expand Down
5 changes: 5 additions & 0 deletions src/app/composer/qgscomposermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,16 @@ void QgsComposerManager::show_clicked()
c = it.value();
if ( c )
{
bool shown = isVisible();
c->show();
c->activate();
c->stackUnder( this );
raise();
activateWindow();
if ( !shown )
{
c->on_mActionZoomAll_triggered();
}
}
}
}
Expand Down

0 comments on commit 489a9d5

Please sign in to comment.