Drop dead model code, and let edits that select nothing return nothing

Model::uid_get, the UidIndex element types, Playback's accumulator, ID_NONE and track_frames_count_get were unused.
Fourteen edit functions only ever returned an empty selection, so they return void.
This commit is contained in:
shweet committed 2026-11-22 18:39:08 -05:00
1 parent c44c7fe8df
commit 544ab3cac9
16 files changed
+79 -117

No files matched your search

-2
View File
@@ -156,7 +156,6 @@ void AnimationPreview::tick(Manager& manager, Settings& settings, float deltaSec
{
playback.isPlaying = false;
playback.isFinished = false;
playback.timing_reset();
}
else
{
@@ -237,7 +236,6 @@ void AnimationPreview::recording_start(Manager& manager, Settings& settings, Doc
return recording_stop(manager, document);
}
document.playback.isPlaying = true;
document.playback.timing_reset();
document.playback.time = recorder.time_get();
document.frameTime = document.playback.time;
}
+2 -4
View File
@@ -625,14 +625,12 @@ void animations_update(Panel& panel, AnimationsPanel& animations)
auto targets = animation_groupable_indices_get(document);
command_push(panel,
[&state, targets = std::set<int>(targets.begin(), targets.end())](Document& document) {
auto groupIds = animation_group_ids_get(document.model);
auto groupId = groupIds.empty() ? 0 : *groupIds.rbegin() + 1;
auto groupId = group_next_id(document.model.animations.entries);
document.edit_apply(EDIT_GROUP_ITEMS, [&](Model& model) {
auto uids = animations_group(model, targets, localize.get(TEXT_NEW_GROUP));
animations_group(model, targets, localize.get(TEXT_NEW_GROUP));
animations_selection_set(document, targets, {groupId});
document.reference_set({*targets.begin()});
state.scrollId = *targets.begin();
return uids;
});
});
});
-1
View File
@@ -38,7 +38,6 @@ void TimelineContext::playback_stop()
{
playback.isPlaying = false;
playback.isFinished = false;
playback.timing_reset();
}
void TimelineContext::context_menu()
+1 -1
View File
@@ -301,7 +301,7 @@ void TimelineContext::item_child(const TimelineRow& row, int index)
return value ? localize.get(BASIC_YES) : localize.get(BASIC_NO);
};
auto visibleLabel = yesNoLabel(isVisible);
auto framesCount = item ? track_frames_count_get(*item) : 0;
auto framesCount = item ? (int)item->frames.size() : 0;
switch (type)
{