Skip to content

Commit

Permalink
Remove WA_DeleteOnClose attribute from QgsBusyIndicatorDialog
Browse files Browse the repository at this point in the history
- Add default title
  • Loading branch information
dakcarto committed Mar 28, 2013
1 parent 25f067c commit 22debea
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion python/gui/qgsbusyindicatordialog.sip
Expand Up @@ -10,7 +10,7 @@ class QgsBusyIndicatorDialog : QDialog
%End
public:
/** Constructor
* Modal busy indicator dialog with no buttons that deletes on close.
* Modal busy indicator dialog with no buttons.
* @param message Text to show above busy progress indicator.
* @note added in 1.9
*/
Expand Down
14 changes: 6 additions & 8 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -1401,10 +1401,9 @@ void QgsComposer::on_mActionDuplicateComposer_triggered()

QgsComposer* newComposer = mQgis->duplicateComposer( this, newTitle );

if ( dlg ) // user may have already closed busy indicator
{
dlg->close();
}
dlg->close();
delete dlg;
dlg = 0;

if ( !newComposer )
{
Expand Down Expand Up @@ -1527,10 +1526,9 @@ void QgsComposer::loadTemplate( bool newCompser )
comp->loadFromTemplate( templateDoc, 0, false );
c->activate();

if ( dlg ) // user may have already closed busy indicator
{
dlg->close();
}
dlg->close();
delete dlg;
dlg = 0;
}
}
}
Expand Down
15 changes: 7 additions & 8 deletions src/app/composer/qgscomposermanager.cpp
Expand Up @@ -189,14 +189,14 @@ void QgsComposerManager::on_mAddButton_clicked()
QDialog* dlg = new QgsBusyIndicatorDialog( tr( "Loading template into composer..." ) );
dlg->setStyleSheet( QgisApp::instance()->styleSheet() );
dlg->show();

newComposer->hide();
loadedOK = newComposer->composition()->loadFromTemplate( templateDoc, 0, false );
newComposer->activate();

if ( dlg ) // user may have already closed busy indicator
{
dlg->close();
}
dlg->close();
delete dlg;
dlg = 0;
}
}

Expand Down Expand Up @@ -396,10 +396,9 @@ void QgsComposerManager::duplicate_clicked()

QgsComposer* newComposer = QgisApp::instance()->duplicateComposer( currentComposer, newTitle );

if ( dlg ) // user may have already closed busy indicator
{
dlg->close();
}
dlg->close();
delete dlg;
dlg = 0;

if ( newComposer )
{
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsbusyindicatordialog.cpp
Expand Up @@ -25,9 +25,9 @@
QgsBusyIndicatorDialog::QgsBusyIndicatorDialog( const QString& message, QWidget* parent, Qt::WFlags fl )
: QDialog( parent, fl ), mMessage( QString( message ) ), mMsgLabel( 0 )
{
setWindowTitle( tr( "QGIS" ) );
setLayout( new QVBoxLayout() );
setWindowModality( Qt::WindowModal );
setAttribute( Qt::WA_DeleteOnClose );
setMinimumWidth( 250 );
mMsgLabel = new QLabel( mMessage );
layout()->addWidget( mMsgLabel );
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsbusyindicatordialog.h
Expand Up @@ -33,7 +33,7 @@ class GUI_EXPORT QgsBusyIndicatorDialog : public QDialog
Q_OBJECT
public:
/** Constructor
* Modal busy indicator dialog with no buttons that deletes on close.
* Modal busy indicator dialog with no buttons.
* @param message Text to show above busy progress indicator.
* @note added in 1.9
*/
Expand Down

0 comments on commit 22debea

Please sign in to comment.