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