# HG changeset patch # User Roeland Merks # Date 2010-10-15 11:32:30 # Node ID ffb1f378901c68444f2433f3f02bd1fcaabf1dc6 # Parent e40119cdbdb9032be9c3270b44c4a68fd841bbc7 # Parent 5469f4c56a5300d8a8cd9cdeac474de1cd4b2c00 Merged one file - need to run now! -- user: Roeland Merks branch merge branch 'default' changed src/ChangeLog changed src/VirtualLeaf-install.nsi changed src/VirtualLeaf.pro changed src/canvas.cpp diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,17 @@ +2010-10-14 + + * VirtualLeaf.pro: Turned debug off to make all profiles must be + consistant. + + * VirtualLeaf-install.nsi: Tweaked paths to coincide with UNIX + distribution, i.e. VirtualLeaf.exe, its libraries, models, and the + uninstaller all go in the bin directory. And leaves directory + placed under data directory. + + * canvas.cpp (exportCellData): Added a check to inquire before + overwritting an existing file. + + 2010-10-14 * mesh.cpp: In response to referees' comments, added new parameter "yield_threshold" instead of fixed parameter '4' for yield threshold. @@ -11,11 +25,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.' @@ -24,7 +46,7 @@ 2010-10-14 diff --git a/src/VirtualLeaf-install.nsi b/src/VirtualLeaf-install.nsi --- a/src/VirtualLeaf-install.nsi +++ b/src/VirtualLeaf-install.nsi @@ -117,8 +117,8 @@ RequestExecutionLevel user section "Virtual Leaf executable" #sectionIn RO # define the output path for the Virtual Leaf executable - setOutPath $INSTDIR - writeUninstaller $INSTDIR\uninstaller.exe + setOutPath $INSTDIR\bin + writeUninstaller $INSTDIR\bin\uninstaller.exe file ..\bin\VirtualLeaf.exe # Required DLLs @@ -145,13 +145,13 @@ sectionEnd section "Virtual Leaf plugins" # define the output path for the Virtual Leaf models - setOutPath $INSTDIR\models + setOutPath $INSTDIR\bin\models file ..\bin\models\* sectionEnd section "Virtual Leaf data" # define the output path for the Virtual Leaf models - setOutPath $INSTDIR\leaves + setOutPath $INSTDIR\data\leaves file ..\data\leaves\* sectionEnd diff --git a/src/VirtualLeaf.pro b/src/VirtualLeaf.pro --- a/src/VirtualLeaf.pro +++ b/src/VirtualLeaf.pro @@ -19,8 +19,8 @@ # Copyright 2010 Roeland Merks. # -CONFIG -= release -CONFIG += debug +CONFIG += release +CONFIG -= debug CONFIG += qt QMAKE_CXXFLAGS += -fexceptions 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); }