crossreferences only with ctrl button and fix missing return value

This commit is contained in:
Stefan Tröger
2015-07-27 20:31:18 +02:00
parent e2f70e5e5b
commit 83eedba043
3 changed files with 5 additions and 6 deletions

View File

@@ -4475,6 +4475,8 @@ namespace SketcherGui {
bool allow(App::Document *pDoc, App::DocumentObject *pObj, const char *sSubName)
{
Sketcher::SketchObject *sketch = static_cast<Sketcher::SketchObject*>(object);
sketch->allowOtherBody = (QApplication::keyboardModifiers() == Qt::ControlModifier);
Sketcher::SketchObject::eReasonList msg;
if (!sketch->isExternalAllowed(pDoc, pObj, &msg)){
switch(msg){
@@ -4485,7 +4487,7 @@ namespace SketcherGui {
this->notAllowedReason = QT_TR_NOOP("This object is in another document.");
break;
case Sketcher::SketchObject::rlOtherPart:
this->notAllowedReason = QT_TR_NOOP("This object belongs to another part, can't link.");
this->notAllowedReason = QT_TR_NOOP("This object belongs to another part or body, can't link. Hold Ctrl to allow crossreferences.");
break;
}
return false;