Skip to content

Commit

Permalink
Remove more unneeded composer window code
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 21, 2017
1 parent c60a73c commit 9be22e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
22 changes: 4 additions & 18 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -465,8 +465,6 @@ QgsComposer::QgsComposer( QgsComposition *composition )
menuBar()->addMenu( mHelpMenu );
#endif

mFirstTime = true;

setMouseTracking( true );
mViewFrame->setMouseTracking( true );

Expand Down Expand Up @@ -816,23 +814,11 @@ void QgsComposer::connectOtherSlots()

void QgsComposer::open()
{
if ( mFirstTime )
{
//mComposition->createDefault();
mFirstTime = false;
show();
zoomFull(); // zoomFull() does not work properly until we have called show()
if ( mView )
{
mView->updateRulers();
}
}

else
show();
zoomFull(); // zoomFull() does not work properly until we have called show()
if ( mView )
{
show(); //make sure the window is displayed - with a saved project, it's possible to not have already called show()
//is that a bug?
activate(); //bring the composer window to the front
mView->updateRulers();
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/app/composer/qgscomposer.h
Expand Up @@ -550,9 +550,6 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
//! Pointer to QGIS application
QgisApp *mQgis = nullptr;

//! The composer was opened first time (-> set defaults)
bool mFirstTime;

//! Layout
QGridLayout *mItemOptionsLayout = nullptr;

Expand Down

0 comments on commit 9be22e1

Please sign in to comment.