mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Added filepath removal for modified images in photo editor.
Fixed #16791.
This commit is contained in:
parent
84fef1f045
commit
852e46f0c9
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue