Initial Grease Pencil 3.0 stage #106848
|
@ -182,7 +182,7 @@ class Layer : public TreeNode, public ::GreasePencilLayer {
|
|||
/**
|
||||
* Should be called whenever the keys in the frames map have changed.
|
||||
*/
|
||||
void tag_frame_times_changed();
|
||||
void tag_frames_map_keys_changed();
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -434,7 +434,7 @@ int Layer::drawing_index_at(int frame) const
|
|||
return this->frames().lookup(*std::prev(it)).drawing_index;
|
||||
|
||||
}
|
||||
|
||||
void Layer::tag_frame_times_changed()
|
||||
void Layer::tag_frames_map_keys_changed()
|
||||
Hans Goudey
commented
`int frame` -> `const int frame`
|
||||
{
|
||||
this->sorted_keys_cache_.tag_dirty();
|
||||
}
|
||||
|
@ -1122,11 +1122,11 @@ void GreasePencil::remove_drawing(int index_to_remove)
|
|||
/* Remove any frame that points to the last drawing. */
|
||||
for (Layer *layer : this->layers_for_write()) {
|
||||
blender::Map<int, GreasePencilFrame> &frames = layer->frames_for_write();
|
||||
int64_t removed = frames.remove_if([last_drawing_index](auto item) {
|
||||
int64_t frames_removed = frames.remove_if([last_drawing_index](auto item) {
|
||||
return item.value.drawing_index == last_drawing_index;
|
||||
});
|
||||
if (removed > 0) {
|
||||
layer->tag_frame_times_changed();
|
||||
if (frames_removed > 0) {
|
||||
layer->tag_frames_map_keys_changed();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
.as_span()
shouldn't be necessary here.