MCPcopy Create free account
hub / github.com/Robotips/uConfig / contextMenuEvent

Method contextMenuEvent

src/kicad/itemmodel/componentlibtreeview.cpp:144–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void ComponentLibTreeView::contextMenuEvent(QContextMenuEvent *event)
145{
146 if (!_editMode)
147 return;
148
149 const QModelIndex &index = indexAt(event->pos());
150 if (!index.isValid())
151 return;
152
153 const QModelIndex &indexFile = _sortProxy->mapToSource(index);
154 if (!indexFile.isValid())
155 return;
156
157 QMenu menu;
158 menu.addAction(_removeAction);
159 menu.exec(event->globalPos());
160}
161
162ComponentLibItemModel *ComponentLibTreeView::model() const
163{

Callers

nothing calls this directly

Calls 1

posMethod · 0.45

Tested by

no test coverage detected