-----------------------------------------------------------------------------
| 336 | |
| 337 | //----------------------------------------------------------------------------- |
| 338 | bool pqPythonFileIO::saveBuffer(const QString& filename, vtkTypeUInt32 location) |
| 339 | { |
| 340 | if (filename.isEmpty()) |
| 341 | { |
| 342 | return false; |
| 343 | } |
| 344 | |
| 345 | const PythonFile file(filename, location, &this->TextEdit); |
| 346 | if (file.writeToFile()) |
| 347 | { |
| 348 | if (file != this->File) |
| 349 | { |
| 350 | this->File.removeSwap(); |
| 351 | this->File = file; |
| 352 | this->File.start(); |
| 353 | this->bufferErased(); |
| 354 | } |
| 355 | |
| 356 | this->setModified(false); |
| 357 | this->fileSaved(file.Name); |
| 358 | |
| 359 | return true; |
| 360 | } |
| 361 | |
| 362 | return false; |
| 363 | } |
no test coverage detected