bool Doc_plugin_interface::getSelect(QList<Plug_Entity *> *sel, const QString& mesage){ bool status = false; QC_ActionGetSelect* a = new QC_ActionGetSelect(*doc, *gView); if (a!=NULL) { if (!(mesage.isEmpty()) ) a->setMesage(mesage); gView->killAllActions(); gView->setCurrentAction(a); QEventLoop ev; while (!a->isCompleted()) { ev.processEvents (); } } // QList<Plug_Entity *> *se = new QList<Plug_Entity *>(); a->getSelected(sel); status = true; gView->killAllActions(); return status; }
bool Doc_plugin_interface::getSelect(QList<Plug_Entity *> *sel, const QString& mesage){ bool status = false; QC_ActionGetSelect* a = new QC_ActionGetSelect(*doc, *gView); if (a!=NULL) { if (!(mesage.isEmpty()) ) a->setMesage(mesage); gView->killAllActions(); gView->setCurrentAction(a); QEventLoop ev; while (!a->isCompleted()) { ev.processEvents (); } } // check if a are cancelled by the user issue #349 RS_EventHandler* eh = gView->getEventHandler(); if (eh!=NULL && eh->isValid(a) ) { a->getSelected(sel, this); status = true; } gView->killAllActions(); return status; }