Remove WA_DeleteOnClose attribute from QgsBusyIndicatorDialog

- Add default title
This commit is contained in:
Larry Shaffer 2013-03-27 20:37:07 -06:00
parent 25f067c9ff
commit 22debea861
5 changed files with 16 additions and 19 deletions

View File

@ -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
*/

View File

@ -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 )
{
@ -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;
}
}
}

View File

@ -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;
}
}
@ -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 )
{

View File

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

View File

@ -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
*/