MCPcopy Create free account
hub / github.com/LibreSprite/LibreSprite / onNewInputPriority

Method onNewInputPriority

src/app/ui/timeline.cpp:2612–2627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2610}
2611
2612void Timeline::onNewInputPriority(InputChainElement* element)
2613{
2614 // It looks like the user wants to execute commands targetting the
2615 // ColorBar instead of the Timeline. Here we disable the selected
2616 // range, so commands like Clear, Copy, Cut, etc. don't target the
2617 // Timeline and they are sent to the active sprite editor.
2618 //
2619 // If the Workspace is selected (an sprite Editor), maybe the user
2620 // want to move the X/Y position of all cels in the Timeline range.
2621 // That is why we don't disable the range in this case.
2622 Workspace* workspace = dynamic_cast<Workspace*>(element);
2623 if (!workspace) {
2624 m_range.disableRange();
2625 invalidate();
2626 }
2627}
2628
2629bool Timeline::onCanCut(Context* ctx)
2630{

Callers 1

prioritizeMethod · 0.45

Calls 1

disableRangeMethod · 0.80

Tested by

no test coverage detected