Skip to content

Commit

Permalink
Flatten nested if-conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
wawuwo committed Mar 8, 2024
1 parent 44ef1f7 commit 1180af6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions qucs/schematic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1289,12 +1289,9 @@ QRect Schematic::sizeOfSelection() const

bool isAnySelected = false;

if (Components->isEmpty())
if (Wires->isEmpty())
if (Diagrams->isEmpty())
if (Paintings->isEmpty()) {
return QRect{};
}
if (Components->isEmpty() && Wires->isEmpty() && Diagrams->isEmpty() && Paintings->isEmpty()) {
return QRect{};
}

int x1, y1, x2, y2;
// find boundings of all components
Expand Down

0 comments on commit 1180af6

Please sign in to comment.