mirror of
https://github.com/chris2511/xca.git
synced 2026-09-14 11:06:19 +05:00
Disable Import button when creating a new template
It does not belong there and caused a crash when pressing import and then OK.
This commit is contained in:
parent
5f4308245c
commit
2bb89cb8c0
@ -370,7 +370,7 @@ void NewX509::setReqAttributes(pki_x509req *req)
|
||||
}
|
||||
|
||||
/* Initialize dialog for Template creation */
|
||||
void NewX509::setTemp(pki_temp *temp)
|
||||
void NewX509::setTemp(pki_temp *temp, bool create)
|
||||
{
|
||||
description->setText(temp->getIntName());
|
||||
capt->setText(tr("Edit XCA template"));
|
||||
@ -381,7 +381,8 @@ void NewX509::setTemp(pki_temp *temp)
|
||||
pt = tmpl;
|
||||
fromTemplate(temp);
|
||||
comment->setPlainText(temp->getComment());
|
||||
connect_pki(temp);
|
||||
if (!create)
|
||||
connect_pki(temp);
|
||||
}
|
||||
|
||||
/* Initialize dialog for Certificate creation */
|
||||
|
||||
@ -77,7 +77,7 @@ class NewX509: public XcaDetail, public Ui::NewX509
|
||||
virtual ~NewX509();
|
||||
void initCtx();
|
||||
void setRequest(); // reduce to request form
|
||||
void setTemp(pki_temp *temp); // reduce to template form
|
||||
void setTemp(pki_temp *temp, bool create = false); // reduce to template form
|
||||
void setCert(); // reduce to certificate form
|
||||
void toTemplate(pki_temp *temp);
|
||||
void fromTemplate(pki_temp *temp);
|
||||
|
||||
@ -62,7 +62,7 @@ bool TempTreeView::runTempDlg(pki_temp *temp)
|
||||
{
|
||||
NewX509 *dlg = new NewX509(this);
|
||||
|
||||
dlg->setTemp(temp);
|
||||
dlg->setTemp(temp, true);
|
||||
if (!dlg->exec()) {
|
||||
delete dlg;
|
||||
return false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user