Skip to content
Permalink
Browse files

Remove WA_DeleteOnClose attribute from QgsBusyIndicatorDialog

- Add default title
  • Loading branch information
dakcarto committed Mar 28, 2013
1 parent 25f067c commit 22debea861a5b403807ba9c797e595a95784454d
@@ -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
*/
@@ -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;
}
}
}
@@ -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 )
{
@@ -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 );
@@ -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
*/

0 comments on commit 22debea

Please sign in to comment.
You can’t perform that action at this time.