MCPcopy Create free account
hub / github.com/LibreCAD/LibreCAD / getSelect

Method getSelect

librecad/src/main/doc_plugin_interface.cpp:1232–1258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1230}
1231
1232bool Doc_plugin_interface::getSelect(QList<Plug_Entity *> *sel, const QString& message){
1233 bool status = false;
1234 QC_ActionGetSelect* a = new QC_ActionGetSelect(*doc, *gView);
1235 if (a) {
1236 if (!(message.isEmpty()) )
1237 a->setMessage(message);
1238 gView->killAllActions();
1239 gView->setCurrentAction(a);
1240 QEventLoop ev;
1241 while (!a->isCompleted())
1242 {
1243 ev.processEvents ();
1244 if (!gView->getEventHandler()->hasAction())
1245 break;
1246 }
1247 // qDebug() << "getSelect: passed event loop";
1248 }
1249// check if a are cancelled by the user issue #349
1250 RS_EventHandler* eh = gView->getEventHandler();
1251 if (eh && eh->isValid(a) ) {
1252 a->getSelected(sel, this);
1253 status = true;
1254 }
1255 gView->killAllActions();
1256 return status;
1257
1258}
1259
1260bool Doc_plugin_interface::getSelectByType(QList<Plug_Entity *> *sel, enum DPI::ETYPE type, const QString& message){
1261 bool status = false;

Callers 4

execCommMethod · 0.80
execCommMethod · 0.80
execCommMethod · 0.80
execCommMethod · 0.80

Calls 9

isEmptyMethod · 0.80
hasActionMethod · 0.80
setMessageMethod · 0.45
killAllActionsMethod · 0.45
setCurrentActionMethod · 0.45
isCompletedMethod · 0.45
getEventHandlerMethod · 0.45
isValidMethod · 0.45
getSelectedMethod · 0.45

Tested by

no test coverage detected