Skip to content

Commit

Permalink
Scripting: Fixed missing repaint after ImageLayer.setImage
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn committed Jan 31, 2024
1 parent 5ce67cb commit 95a5cb3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tiled/editableimagelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ void EditableImageLayer::setImage(ScriptImage *image, const QUrl &source)

// WARNING: This function has no undo!
imageLayer()->loadFromImage(QPixmap::fromImage(image->image()), source);

if (auto doc = document())
emit doc->changed(ImageLayerChangeEvent(imageLayer(), ImageLayerChangeEvent::ImageSourceProperty));
}

void EditableImageLayer::setRepeatX(bool repeatX)
Expand Down

0 comments on commit 95a5cb3

Please sign in to comment.