Skip to content

Commit 160a5c4

Browse files
committed
Fix composer window activations on Windows and Ubuntu
1 parent b1f1cbd commit 160a5c4

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/app/composer/qgscomposermanager.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,17 @@ void QgsComposerManager::show_clicked()
301301
c = it.value();
302302
if ( c )
303303
{
304+
// extra activation steps for Windows
305+
bool shown = c->isVisible();
306+
hide();
307+
304308
c->activate();
309+
310+
// extra activation steps for Windows
311+
if ( !shown )
312+
{
313+
c->on_mActionZoomAll_triggered();
314+
}
305315
}
306316
}
307317
}
@@ -378,6 +388,10 @@ void QgsComposerManager::duplicate_clicked()
378388

379389
if ( newComposer )
380390
{
391+
// extra activation steps for Windows
392+
hide();
393+
newComposer->activate();
394+
381395
// no need to add new composer to list widget, if just closing this->exec();
382396
close();
383397
}

src/app/qgisapp.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4780,7 +4780,8 @@ bool QgisApp::loadComposersFromProject( const QDomDocument& doc )
47804780
mPrintComposers.insert( composer );
47814781
mPrintComposersMenu->addAction( composer->windowAction() );
47824782
#ifndef Q_OS_MACX
4783-
composer->showMinimized();
4783+
composer->setWindowState( Qt::WindowMinimized );
4784+
composer->show();
47844785
#endif
47854786
composer->zoomFull();
47864787
if ( composerNodes.at( i ).toElement().attribute( "visible", "1" ).toInt() < 1 )

0 commit comments

Comments
 (0)