Changeset - f563ace40263
[Not reviewed]
default
0 1 0
Roeland Merks - 15 years ago 2010-11-24 18:24:58
roeland.merks@cwi.nl
In response to referee's comment

"I am also afraid that the ‘snapshot’ and the ‘Export cell data’ functions do not seem to work very well in my hands, could the program be changed so that the correct file extension (.jpg, .tif, .txt, .dat, .xls, .csv…) is given automatically."

I corrected the "exportCellData()" function in canvas.cpp. It did not actually call exportCellData(filename) after the user entered a filename (logic after calling QMessageBox was incorrect).

--
user: Roeland Merks <roeland.merks@cwi.nl>
branch 'default'
changed src/canvas.cpp
1 file changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/canvas.cpp
Show inline comments
 
@@ -1381,6 +1381,9 @@ xmlNode *Main::XMLSettingsTree(void)
 
  return settings;
 
}
 

	
 

	
 
#define QDEBUG
 

	
 
void Main::exportCellData(QString fileName) {
 
  
 
#ifdef QDEBUG  
 
@@ -1406,7 +1409,7 @@ void Main::exportCellData() {
 
  if ( fd->exec() == QDialog::Accepted ) {
 
    fileName = fd->selectedFile();
 
    if ( QFile::exists( fileName ) &&
 
	!QMessageBox::question(
 
	 !QMessageBox::question(
 
			       this,
 
			       tr("Overwrite File? -- Cell Data"),
 
			       tr("A file called %1 already exists."
 
@@ -1414,7 +1417,9 @@ void Main::exportCellData() {
 
			       .arg( fileName ),
 
			       tr("&Yes"), tr("&No"),
 
			       QString::null, 1, 1 ) ) {
 
      this->exportCellData(fileName);
 
      return exportCellData();
 
    } else {
 
      exportCellData(fileName);
 
    }
 
  }
 
}
0 comments (0 inline, 0 general)