Summary: | Save action is disabled / dirty flag is cleared, even if saving failed | ||
---|---|---|---|
Product: | [Applications] digikam | Reporter: | Will Stephenson <wstephenson> |
Component: | ImageEditor-Save | Assignee: | Digikam Developers <digikam-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 0.7.3 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | 7.5.0 | |
Sentry Crash Report: |
Description
Will Stephenson
2005-04-04 19:37:06 UTC
Still present in CVS CVS commit by toma: Fixed the bug where the menu items thought the image was saved correctly because the temporary file was successfully saved. But if the real image file misses write rights, that would result in a situation where it is not possible to save the modified image anymore. Bug caused by implementation of wish 87105 (redo)... BUGS:103219 M +5 -0 canvas.cpp 1.37 M +1 -0 canvas.h 1.25 M +3 -2 imagewindow.cpp 1.96 M +14 -7 imlibinterface.cpp 1.46 M +1 -0 imlibinterface.h 1.25 --- kdeextragear-3/digikam/utilities/imageeditor/canvas.cpp #1.36:1.37 @@ -400,4 +400,9 @@ int Canvas::saveAsTmpFile(const QString& } +void Canvas::setModified(bool val) +{ + d->im->setModified(val); +} + int Canvas::imageWidth() { --- kdeextragear-3/digikam/utilities/imageeditor/canvas.h #1.24:1.25 @@ -58,4 +58,5 @@ public: int PNGcompression, bool TIFFcompression, const QString& mimeType=0); + void setModified(bool val); bool maxZoom(); --- kdeextragear-3/digikam/utilities/imageeditor/imagewindow.cpp #1.95:1.96 @@ -944,8 +944,9 @@ bool ImageWindow::save() { QString errMsg(SyncJob::lastErrorMsg()); - KMessageBox::error(this, errMsg, errMsg); + KMessageBox::error(this, errMsg, "Error Saving File"); return false; } + m_canvas->setModified( false ); emit signalFileModified(m_urlCurrent); QTimer::singleShot(0, this, SLOT(slotLoadCurrent())); --- kdeextragear-3/digikam/utilities/imageeditor/imlibinterface.cpp #1.45:1.46 @@ -417,11 +417,18 @@ bool ImlibInterface::saveAs(const QStrin imlib_context_pop(); - if (result) + return result; +} + +void ImlibInterface::setModified(bool val) +{ + if (val) + { + emit signalModified(true, true); + } + else { d->undoMan->clear(); emit signalModified(false, false); } - - return result; } --- kdeextragear-3/digikam/utilities/imageeditor/imlibinterface.h #1.24:1.25 @@ -59,4 +59,5 @@ public: int PNGcompression, bool TIFFcompression, const QString& mimeType=0); + void setModified (bool val); void zoom(double val); |