2
0
forked from Ivasoft/DSView

update: decoder options title

This commit is contained in:
dreamsourcelabTAI
2022-06-10 10:08:31 +08:00
parent 3d6328df0c
commit 18320d7987
3 changed files with 8 additions and 4 deletions

View File

@@ -67,7 +67,7 @@ DecoderOptionsDlg::~DecoderOptionsDlg()
_bindings.clear();
}
void DecoderOptionsDlg::load_options(view::DecodeTrace *trace)
void DecoderOptionsDlg::load_options(view::DecodeTrace *trace, bool isNew)
{
assert(trace);
@@ -82,7 +82,11 @@ void DecoderOptionsDlg::load_options(view::DecodeTrace *trace)
form->setLabelAlignment(Qt::AlignLeft);
form->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
dlg->layout()->addLayout(form);
dlg->setTitle(tr("Decoder Options"));
if (isNew)
dlg->setTitle(tr("New Decoder"));
else
dlg->setTitle(tr("Decoder Options"));
//scroll pannel
QWidget *scroll_pannel = new QWidget();

View File

@@ -84,7 +84,7 @@ public:
cursor2 = _cursor2;
}
void load_options(view::DecodeTrace *trace);
void load_options(view::DecodeTrace *trace, bool isNew);
private:
void load_decoder_forms(QWidget *container);

View File

@@ -683,7 +683,7 @@ bool DecodeTrace::create_popup(bool isnew)
QWidget *top = AppControl::Instance()->GetTopWindow();
dialogs::DecoderOptionsDlg dlg(top);
dlg.set_cursor_range(_decode_cursor1, _decode_cursor2);
dlg.load_options(this);
dlg.load_options(this, isnew);
if (QDialog::Accepted == dlg.exec())
{