| 1656 | } |
| 1657 | |
| 1658 | void |
| 1659 | TrackerPanel::onMultipleKeyframesSetOnTrackCenter(const TrackMarkerPtr& marker, |
| 1660 | const std::list<double>& keys) |
| 1661 | { |
| 1662 | TrackKeysMap::iterator found = _imp->keys.find(marker); |
| 1663 | |
| 1664 | if ( found == _imp->keys.end() ) { |
| 1665 | TrackKeys k; |
| 1666 | for (std::list<double>::const_iterator it = keys.begin(); it != keys.end(); ++it) { |
| 1667 | k.centerKeys.insert(*it); |
| 1668 | } |
| 1669 | _imp->keys[marker] = k; |
| 1670 | } else { |
| 1671 | std::list<int> reallyInserted; |
| 1672 | for (std::list<double>::const_iterator it = keys.begin(); it != keys.end(); ++it) { |
| 1673 | std::pair<std::set<double>::iterator, bool> ret = found->second.centerKeys.insert(*it); |
| 1674 | if (ret.second) { |
| 1675 | reallyInserted.push_back(*it); |
| 1676 | } |
| 1677 | } |
| 1678 | if (!reallyInserted.empty() && found->second.visible) { |
| 1679 | NodeGuiPtr node = _imp->node.lock(); |
| 1680 | if (!node) { |
| 1681 | return; |
| 1682 | } |
| 1683 | NodePtr internalNode = node->getNode(); |
| 1684 | if (!internalNode) { |
| 1685 | return; |
| 1686 | } |
| 1687 | AppInstPtr app = internalNode->getApp(); |
| 1688 | if (!app) { |
| 1689 | return; |
| 1690 | } |
| 1691 | app->addMultipleKeyframeIndicatorsAdded(reallyInserted, true); |
| 1692 | } |
| 1693 | } |
| 1694 | } |
| 1695 | |
| 1696 | void |
| 1697 | TrackerPanelPrivate::setVisibleItemKeyframes(const std::list<int>& keyframes, |