mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 15:33:51 +00:00
Shortcuts for adding/removing plots
This commit is contained in:
parent
59f3057dd9
commit
ccb71f9650
16 changed files with 397 additions and 71 deletions
|
|
@ -380,20 +380,19 @@ void TraceSmithChart::draw(QPainter &p) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(dropPending) {
|
||||
if(dropPending && supported(dropTrace)) {
|
||||
// adjust coords due to shifted restore
|
||||
p.setOpacity(0.5);
|
||||
p.setBrush(Qt::white);
|
||||
p.setPen(Qt::white);
|
||||
p.drawEllipse(-polarCoordMax, -polarCoordMax, 2*polarCoordMax, 2*polarCoordMax);
|
||||
p.setOpacity(dropOpacity);
|
||||
p.setBrush(dropBackgroundColor);
|
||||
p.setPen(dropForegroundColor);
|
||||
p.drawRect(getDropRect());
|
||||
auto font = p.font();
|
||||
font.setPixelSize(20);
|
||||
p.setFont(font);
|
||||
p.setOpacity(1.0);
|
||||
p.setPen(Qt::white);
|
||||
p.setPen(dropSection == DropSection::OnPlot ? dropHighlightColor : dropForegroundColor);
|
||||
auto text = "Drop here to add\n" + dropTrace->name() + "\nto Smith chart";
|
||||
p.drawText(p.window(), Qt::AlignCenter, text);
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue