Skip to content

Commit

Permalink
Import: PR6497 move return statement to new line
Browse files Browse the repository at this point in the history
  • Loading branch information
chennes committed Mar 29, 2022
1 parent bb0e2f1 commit 35156cd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
15 changes: 10 additions & 5 deletions src/Mod/Import/App/dxf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2675,7 +2675,8 @@ bool CDxfRead::ReadLwPolyLine()
case 70:
// flags
get_line();
if(sscanf(m_str, "%d", &flags) != 1)return false;
if(sscanf(m_str, "%d", &flags) != 1)
return false;
closed = ((flags & 1) != 0);
break;
case 62:
Expand Down Expand Up @@ -2835,7 +2836,8 @@ bool CDxfRead::ReadPolyLine()
case 70:
// flags
get_line();
if(sscanf(m_str, "%d", &flags) != 1)return false;
if(sscanf(m_str, "%d", &flags) != 1)
return false;
closed = ((flags & 1) != 0);
break;
case 62:
Expand Down Expand Up @@ -3235,7 +3237,8 @@ bool CDxfRead::ReadLayer()
case 62:
// layer color ; if negative, layer is off
get_line();
if(sscanf(m_str, "%d", &aci) != 1)return false;
if(sscanf(m_str, "%d", &aci) != 1)
return false;
break;

case 6: // linetype name
Expand All @@ -3259,14 +3262,16 @@ bool CDxfRead::ReadLayer()
void CDxfRead::DoRead(const bool ignore_errors /* = false */ )
{
m_ignore_errors = ignore_errors;
if(m_fail)return;
if(m_fail)
return;

get_line();

while(!((*m_ifs).eof()))
{
if (!strcmp( m_str, "$INSUNITS" )){
if (!ReadUnits())return;
if (!ReadUnits())
return;
continue;
} // End if - then

Expand Down
6 changes: 4 additions & 2 deletions src/Mod/Import/Gui/AppImportGuiPy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ class ImportOCAFExt : public Import::ImportOCAF2
private:
virtual void applyFaceColors(Part::Feature* part, const std::vector<App::Color>& colors) override {
auto vp = dynamic_cast<PartGui::ViewProviderPartExt*>(Gui::Application::Instance->getViewProvider(part));
if (!vp) return;
if (!vp)
return;
if(colors.empty()) {
// vp->MapFaceColor.setValue(true);
// vp->MapLineColor.setValue(true);
Expand All @@ -316,7 +317,8 @@ class ImportOCAFExt : public Import::ImportOCAF2
}
virtual void applyEdgeColors(Part::Feature* part, const std::vector<App::Color>& colors) override {
auto vp = dynamic_cast<PartGui::ViewProviderPartExt*>(Gui::Application::Instance->getViewProvider(part));
if (!vp) return;
if (!vp)
return;
// vp->MapLineColor.setValue(false);
if(colors.size() == 1)
vp->LineColor.setValue(colors.front());
Expand Down

0 comments on commit 35156cd

Please sign in to comment.