Skip to content

Commit

Permalink
Add activate slot
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Apr 30, 2014
1 parent 4821988 commit a66893d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/app/composer/qgscomposermanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ void QgsComposerManager::refreshComposers()
}
}

void QgsComposerManager::activate()
{
raise();
setWindowState( windowState() & ~Qt::WindowMinimized );
activateWindow();
}

QMap<QString, QString> QgsComposerManager::defaultTemplates( bool fromUser ) const
{
QMap<QString, QString> templateMap;
Expand Down
4 changes: 4 additions & 0 deletions src/app/composer/qgscomposermanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ class QgsComposerManager: public QDialog, private Ui::QgsComposerManagerBase
QgsComposerManager( QWidget * parent = 0, Qt::WindowFlags f = 0 );
~QgsComposerManager();

public slots:
/** Raise, unminimize and activate this window */
void activate();

private:
/**Stores the relation between items and composer pointers. A 0 pointer for the composer means that
this composer needs to be created from a default template*/
Expand Down
3 changes: 1 addition & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3929,8 +3929,7 @@ void QgisApp::showComposerManager()
connect( mComposerManager, SIGNAL( finished( int ) ), this, SLOT( deleteComposerManager() ) );
}
mComposerManager->show();
mComposerManager->raise();
mComposerManager->activateWindow();
mComposerManager->activate();
}

void QgisApp::deleteComposerManager()
Expand Down

0 comments on commit a66893d

Please sign in to comment.