| 2610 | } |
| 2611 | |
| 2612 | void 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 | |
| 2629 | bool Timeline::onCanCut(Context* ctx) |
| 2630 | { |
no test coverage detected