diff --git a/src/meshlab/glarea.cpp b/src/meshlab/glarea.cpp index a98351b41..9068ee8a9 100644 --- a/src/meshlab/glarea.cpp +++ b/src/meshlab/glarea.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.139 2008/01/10 17:15:16 cignoni +unsaved dialog has a better behaviour + Revision 1.138 2008/01/04 18:23:24 cignoni Corrected a wrong type (glwidget instead of glarea) in the decoration callback. @@ -552,25 +555,19 @@ void GLArea::closeEvent(QCloseEvent *event) bool close = true; if(isWindowModified()) { - if(QMessageBox::question( - this, - tr("MeshLab"), - tr("File %1 modified.\n\n" - "Continue without saving?") - .arg(getFileName()), - QMessageBox::Yes|QMessageBox::Default, - QMessageBox::No|QMessageBox::Escape, - QMessageBox::NoButton) == QMessageBox::No) + QMessageBox::StandardButton ret=QMessageBox::question( + this, tr("MeshLab"), tr("File '%1' modified.\n\nClose without saving?").arg(getFileName()), + QMessageBox::Yes|QMessageBox::No, + QMessageBox::No); + if(ret==QMessageBox::No) { close = false; // don't close please! + event->ignore(); + return; } } - if(getEditAction()) endEdit(); - event->ignore(); - if(close) - { - event->accept(); - } + if(getEditAction()) endEdit(); + event->accept(); } void GLArea::keyReleaseEvent ( QKeyEvent * e ) diff --git a/src/meshlab/stdpardialog.cpp b/src/meshlab/stdpardialog.cpp index f8646e232..04f856588 100644 --- a/src/meshlab/stdpardialog.cpp +++ b/src/meshlab/stdpardialog.cpp @@ -24,6 +24,9 @@ History $Log$ +Revision 1.23 2008/01/10 17:16:44 cignoni +unsaved dialog has a better behaviour + Revision 1.22 2007/12/11 23:56:40 cignoni better resizing of dialogs @@ -195,7 +198,7 @@ void MeshlabStdDialog::loadFrameContent() QLabel *ql; QGridLayout *gridLayout = new QGridLayout(qf); - setLayout(gridLayout); + qf->setLayout(gridLayout); setWindowTitle(curmfi->filterName(curAction)); ql = new QLabel(""+curmfi->filterInfo(curAction)+"",qf);