mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Remove WA_DeleteOnClose attribute from QgsBusyIndicatorDialog
- Add default title
This commit is contained in:
parent
25f067c9ff
commit
22debea861
@ -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
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user