Skip to content

Commit

Permalink
Fix adding a curve on Smith chart crash #92
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed Sep 19, 2022
1 parent 1e4ffc5 commit c763bc3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions qucs/diagrams/diagramdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1201,16 +1201,18 @@ void DiagramDialog::slotApply()
Diag->engineeringNotation = notation;
}

auto yUnit = Diag->yAxis.Units;
if (yUnit != LogUnitsY->currentIndex()) {
Diag->yAxis.Units = LogUnitsY->currentIndex();
changed = true;
}
if((Diag->Name.left(4) == "Rect") || (Diag->Name == "Curve")) {
auto yUnit = Diag->yAxis.Units;
if (yUnit != LogUnitsY->currentIndex()) {
Diag->yAxis.Units = LogUnitsY->currentIndex();
changed = true;
}

auto zUnit = Diag->zAxis.Units;
if (zUnit != LogUnitsZ->currentIndex()) {
Diag->zAxis.Units = LogUnitsZ->currentIndex();
changed = true;
auto zUnit = Diag->zAxis.Units;
if (zUnit != LogUnitsZ->currentIndex()) {
Diag->zAxis.Units = LogUnitsZ->currentIndex();
changed = true;
}
}

if(GridOn) if(Diag->xAxis.GridOn != GridOn->isChecked()) {
Expand Down

0 comments on commit c763bc3

Please sign in to comment.