TD: PR6497 move return statement to new line
This commit is contained in:
@@ -220,7 +220,8 @@ short DrawProjGroup::mustExecute() const
|
||||
spacingX.isTouched() ||
|
||||
spacingY.isTouched();
|
||||
}
|
||||
if (result) return result;
|
||||
if (result)
|
||||
return result;
|
||||
return TechDraw::DrawViewCollection::mustExecute();
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@ void QGTracker::sleep(bool b)
|
||||
QPointF QGTracker::snapToAngle(QPointF dumbPt)
|
||||
{
|
||||
// If no point selected yet, snapping has no sense
|
||||
if (m_points.size() < 1) return dumbPt;
|
||||
if (m_points.size() < 1)
|
||||
return dumbPt;
|
||||
|
||||
QPointF result(dumbPt);
|
||||
double angleIncr = M_PI / 8.0; //15*
|
||||
|
||||
@@ -318,7 +318,8 @@ void TaskCosVertex::enableTaskButtons(bool b)
|
||||
bool TaskCosVertex::accept()
|
||||
{
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
removeTracker();
|
||||
double x = ui->dsbX->value().getValue();
|
||||
@@ -338,7 +339,8 @@ bool TaskCosVertex::accept()
|
||||
bool TaskCosVertex::reject()
|
||||
{
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
removeTracker();
|
||||
m_trackerMode = QGTracker::TrackerMode::None;
|
||||
|
||||
@@ -620,7 +620,8 @@ bool TaskDetail::accept()
|
||||
// Base::Console().Message("TD::accept()\n");
|
||||
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
m_ghost->hide();
|
||||
getDetailFeat()->requestPaint();
|
||||
@@ -634,7 +635,8 @@ bool TaskDetail::reject()
|
||||
{
|
||||
// Base::Console().Message("TD::reject()\n");
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
m_ghost->hide();
|
||||
if (m_mode == CREATEMODE) {
|
||||
|
||||
@@ -807,7 +807,8 @@ bool TaskLeaderLine::accept()
|
||||
}
|
||||
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
if (!getCreateMode()) {
|
||||
// removeTracker();
|
||||
@@ -838,7 +839,8 @@ bool TaskLeaderLine::reject()
|
||||
}
|
||||
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
if (getCreateMode() &&
|
||||
(m_lineFeat != nullptr) ) {
|
||||
|
||||
@@ -230,7 +230,8 @@ bool TaskLineDecor::accept()
|
||||
{
|
||||
// Base::Console().Message("TLD::accept()\n");
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_partFeat->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
if (apply()) {
|
||||
applyDecorations();
|
||||
@@ -248,7 +249,8 @@ bool TaskLineDecor::reject()
|
||||
{
|
||||
// Base::Console().Message("TLD::reject()\n");
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_partFeat->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
return false;
|
||||
|
||||
@@ -526,7 +526,8 @@ bool TaskProjGroup::accept()
|
||||
{
|
||||
// Base::Console().Message("TPG::accept()\n");
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(multiView->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
multiView->recomputeChildren();
|
||||
multiView->recomputeFeature();
|
||||
@@ -539,7 +540,8 @@ bool TaskProjGroup::accept()
|
||||
bool TaskProjGroup::reject()
|
||||
{
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(multiView->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
if (getCreateMode()) {
|
||||
//remove the object completely from the document
|
||||
|
||||
@@ -530,7 +530,8 @@ bool TaskRichAnno::accept()
|
||||
}
|
||||
|
||||
Gui::Document* doc = Gui::Application::Instance->getDocument(m_basePage->getDocument());
|
||||
if (!doc) return false;
|
||||
if (!doc)
|
||||
return false;
|
||||
|
||||
if (!getCreateMode()) {
|
||||
updateAnnoFeature();
|
||||
|
||||
@@ -194,8 +194,10 @@ TechDraw::DrawGeomHatch* ViewProviderGeomHatch::getViewObject() const
|
||||
Gui::MDIView *ViewProviderGeomHatch::getMDIView() const
|
||||
{
|
||||
auto obj = getViewObject();
|
||||
if(!obj) return nullptr;
|
||||
if(!obj)
|
||||
return nullptr;
|
||||
auto vp = Gui::Application::Instance->getViewProvider(obj->getSourceView());
|
||||
if(!vp) return nullptr;
|
||||
if(!vp)
|
||||
return nullptr;
|
||||
return vp->getMDIView();
|
||||
}
|
||||
|
||||
@@ -163,8 +163,10 @@ bool ViewProviderHatch::canDelete(App::DocumentObject *obj) const
|
||||
Gui::MDIView *ViewProviderHatch::getMDIView() const
|
||||
{
|
||||
auto obj = getViewObject();
|
||||
if(!obj) return nullptr;
|
||||
if(!obj)
|
||||
return nullptr;
|
||||
auto vp = Gui::Application::Instance->getViewProvider(obj->getSourceView());
|
||||
if(!vp) return nullptr;
|
||||
if(!vp)
|
||||
return nullptr;
|
||||
return vp->getMDIView();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user