forked from bartvdbraak/blender
Fix #108501: Image Editor glitch after texture painting undo
When doing the second undo, the image wasn't properly marked for full update. There reason was that in some cases the partial_updater was totally reconstructed: `first_changeset_id` and `last_changeset_id` were both 0. While the `user_imp->last_changeset_id` was still its last value (e.g., 3). The fix is to have the partial updater validator to check for the last change set as well (it was only checking for the first change set). This way we cover both scenarios when user_imp->last_changeset_id is out of the range of the partial update history. Pull Request: https://projects.blender.org/blender/blender/pulls/108533
This commit is contained in:
parent
215925e04c
commit
9d00d13767
@ -419,7 +419,15 @@ struct PartialUpdateRegisterImpl {
|
|||||||
*/
|
*/
|
||||||
bool can_construct(ChangesetID changeset_id)
|
bool can_construct(ChangesetID changeset_id)
|
||||||
{
|
{
|
||||||
return changeset_id >= first_changeset_id;
|
if (changeset_id < first_changeset_id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changeset_id > last_changeset_id) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user