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