Remove more unneeded composer window code

This commit is contained in:
Nyall Dawson 2017-03-17 19:50:36 +10:00
parent c60a73cb9a
commit 9be22e1938
2 changed files with 4 additions and 21 deletions

View File

@ -465,8 +465,6 @@ QgsComposer::QgsComposer( QgsComposition *composition )
menuBar()->addMenu( mHelpMenu );
#endif
mFirstTime = true;
setMouseTracking( true );
mViewFrame->setMouseTracking( true );
@ -816,23 +814,11 @@ void QgsComposer::connectOtherSlots()
void QgsComposer::open()
{
if ( mFirstTime )
show();
zoomFull(); // zoomFull() does not work properly until we have called show()
if ( mView )
{
//mComposition->createDefault();
mFirstTime = false;
show();
zoomFull(); // zoomFull() does not work properly until we have called show()
if ( mView )
{
mView->updateRulers();
}
}
else
{
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();
}
}

View File

@ -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;