| 837 | } |
| 838 | |
| 839 | void |
| 840 | MultiInstancePanel::removeNodeFromSelection(const NodePtr & node) |
| 841 | { |
| 842 | int index = -1; |
| 843 | int i = 0; |
| 844 | |
| 845 | for (std::list<std::pair<NodeWPtr, bool > >::iterator it = _imp->instances.begin(); it != _imp->instances.end(); ++it, ++i) { |
| 846 | if (it->first.lock() == node) { |
| 847 | index = i; |
| 848 | break; |
| 849 | } |
| 850 | } |
| 851 | assert(index != -1); |
| 852 | QItemSelection newSelection( _imp->model->index(index, 0), _imp->model->index(index, _imp->view->columnCount() - 1) ); |
| 853 | _imp->view->selectionModel()->select(newSelection, QItemSelectionModel::Deselect); |
| 854 | } |
| 855 | |
| 856 | void |
| 857 | MultiInstancePanel::clearSelection() |