mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-07 15:33:51 +00:00
assign signal receiver to delete connection when closing dialog
This commit is contained in:
parent
be340f2adc
commit
e35766c7b8
2 changed files with 366 additions and 4 deletions
|
|
@ -172,7 +172,7 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||
for(auto l : plot->constantLines) {
|
||||
auto item = new QListWidgetItem(l->getDescription());
|
||||
ui->lineList->addItem(item);
|
||||
connect(l, &XYPlotConstantLine::editingFinished, [=](){
|
||||
connect(l, &XYPlotConstantLine::editingFinished, this, [=](){
|
||||
item->setText(l->getDescription());
|
||||
});
|
||||
}
|
||||
|
|
@ -187,7 +187,7 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||
ui->lineList->setCurrentItem(item);
|
||||
ui->removeLine->setEnabled(true);
|
||||
editLine(line);
|
||||
connect(line, &XYPlotConstantLine::editingFinished, [=](){
|
||||
connect(line, &XYPlotConstantLine::editingFinished, this, [=](){
|
||||
if(line->getPoints().size() < 2) { // must have 2 points to be a line
|
||||
int index = ui->lineList->currentRow();
|
||||
removeLine(index);
|
||||
|
|
@ -196,11 +196,11 @@ XYplotAxisDialog::XYplotAxisDialog(TraceXYPlot *plot) :
|
|||
}
|
||||
});
|
||||
});
|
||||
connect(ui->removeLine, &QPushButton::clicked, [=](){
|
||||
connect(ui->removeLine, &QPushButton::clicked, this, [=](){
|
||||
int index = ui->lineList->currentRow();
|
||||
removeLine(index);
|
||||
});
|
||||
connect(ui->exportLines, &QPushButton::clicked, [=](){
|
||||
connect(ui->exportLines, &QPushButton::clicked, this, [=](){
|
||||
QString filename = QFileDialog::getSaveFileName(nullptr, "Save limit lines", "", "Limit files (*.limits)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
if(filename.isEmpty()) {
|
||||
// aborted selection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue