| 1230 | } |
| 1231 | |
| 1232 | bool 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 | |
| 1260 | bool Doc_plugin_interface::getSelectByType(QList<Plug_Entity *> *sel, enum DPI::ETYPE type, const QString& message){ |
| 1261 | bool status = false; |
no test coverage detected