Skip to content

Commit

Permalink
Fix composer window activations on Windows and Ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
dakcarto committed Mar 2, 2013
1 parent b1f1cbd commit 160a5c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/app/composer/qgscomposermanager.cpp
Expand Up @@ -301,7 +301,17 @@ void QgsComposerManager::show_clicked()
c = it.value();
if ( c )
{
// extra activation steps for Windows
bool shown = c->isVisible();
hide();

c->activate();

// extra activation steps for Windows
if ( !shown )
{
c->on_mActionZoomAll_triggered();
}
}
}
}
Expand Down Expand Up @@ -378,6 +388,10 @@ void QgsComposerManager::duplicate_clicked()

if ( newComposer )
{
// extra activation steps for Windows
hide();
newComposer->activate();

// no need to add new composer to list widget, if just closing this->exec();
close();
}
Expand Down
3 changes: 2 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -4780,7 +4780,8 @@ bool QgisApp::loadComposersFromProject( const QDomDocument& doc )
mPrintComposers.insert( composer );
mPrintComposersMenu->addAction( composer->windowAction() );
#ifndef Q_OS_MACX
composer->showMinimized();
composer->setWindowState( Qt::WindowMinimized );
composer->show();
#endif
composer->zoomFull();
if ( composerNodes.at( i ).toElement().attribute( "visible", "1" ).toInt() < 1 )
Expand Down

0 comments on commit 160a5c4

Please sign in to comment.