diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2010-10-14 + + * canvas.cpp (exportCellData): Added a check to inquire before + overwritting an existing file. + + 2010-10-14 * cell.cpp (DivideWalls): accomodated for rename of Circumference -> WallCircumference @@ -6,11 +12,19 @@ 2010-10-14 * hull.cpp: added an operator< to sort Points - * cellbase.cpp (ExactCircumference): I added a new function ExactCircumference, yielding the circumference of the cell along its wall_elements + * cellbase.cpp (ExactCircumference): I added a new function + ExactCircumference, yielding the circumference of the cell along + its wall_elements + + * VirtualLeaf.cpp: adjust info_string to accomodate for new name + of function CellBase::Circumference -> CellBase::WallCircumference - * VirtualLeaf.cpp: adjust info_string to accomodate for new name of function CellBase::Circumference -> CellBase::WallCircumference - * mesh.cpp: corrected Mesh::Compactness, the boundary coordinates need to be sorted in x,y order for the convex hull algorithm (thanks Margriet!). I updated CSVExportCellData so it exports the circumferences of hull and boundary_polygon. - + * mesh.cpp: corrected Mesh::Compactness, the boundary coordinates + need to be sorted in x,y order for the convex hull algorithm + (thanks Margriet!). I updated CSVExportCellData so it exports the + circumferences of hull and boundary_polygon. + + 2010-10-14 * VirtualLeafpar.tmpl (export_fn_prefix): changed to 'cell.' @@ -19,7 +33,7 @@ 2010-10-14 diff --git a/src/canvas.cpp b/src/canvas.cpp --- a/src/canvas.cpp +++ b/src/canvas.cpp @@ -691,7 +691,7 @@ void Main::saveStateXML() this, tr("Overwrite File? -- Leaf Growth"), tr("A file called %1 already exists." - "Do you want to overwrite it?") + " Do you want to overwrite it?") .arg( fileName ), tr("&Yes"), tr("&No"), QString::null, 1, 1 ) ) { @@ -724,7 +724,7 @@ void Main::snapshot() this, tr("Overwrite File? -- Leaf Growth"), tr("A file called %1 already exists." - "Do you want to overwrite it?") + " Do you want to overwrite it?") .arg( fileName ), tr("&Yes"), tr("&No"), QString::null, 1, 1 ) ) { @@ -1403,8 +1403,18 @@ void Main::exportCellData() { fd->setMode( Q3FileDialog::AnyFile ); if ( fd->exec() == QDialog::Accepted ) { fileName = fd->selectedFile(); + if ( QFile::exists( fileName ) && + !QMessageBox::question( + this, + tr("Overwrite File? -- Cell Data"), + tr("A file called %1 already exists." + " Do you want to overwrite it?") + .arg( fileName ), + tr("&Yes"), tr("&No"), + QString::null, 1, 1 ) ) { + this->exportCellData(fileName); + } } - this->exportCellData(fileName); }