mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Added filepath removal for modified images in photo editor.
Fixed #16791.
This commit is contained in:
@@ -328,7 +328,7 @@ void UpdateImageDetails(PreparedFile &file, int previewWidth) {
|
||||
file.preview.setDevicePixelRatio(cRetinaFactor());
|
||||
}
|
||||
|
||||
bool ApplyModifications(const PreparedList &list) {
|
||||
bool ApplyModifications(PreparedList &list) {
|
||||
auto applied = false;
|
||||
for (auto &file : list.files) {
|
||||
const auto image = std::get_if<Image>(&file.information->media);
|
||||
@@ -336,6 +336,9 @@ bool ApplyModifications(const PreparedList &list) {
|
||||
continue;
|
||||
}
|
||||
applied = true;
|
||||
if (!file.path.isEmpty()) {
|
||||
file.path = QString();
|
||||
}
|
||||
image->data = Editor::ImageModified(
|
||||
std::move(image->data),
|
||||
image->modifications);
|
||||
|
||||
@@ -50,6 +50,6 @@ enum class MimeDataState {
|
||||
void PrepareDetails(Ui::PreparedFile &file, int previewWidth);
|
||||
void UpdateImageDetails(Ui::PreparedFile &file, int previewWidth);
|
||||
|
||||
[[nodiscard]] bool ApplyModifications(const Ui::PreparedList &list);
|
||||
[[nodiscard]] bool ApplyModifications(Ui::PreparedList &list);
|
||||
|
||||
} // namespace Storage
|
||||
|
||||
Reference in New Issue
Block a user