mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-02-02 13:52:55 +08:00
fix: Can't remove the decoder
This commit is contained in:
parent
1879e7206d
commit
256cb24380
@ -421,8 +421,9 @@ bool ProtocolDock::add_protocol_by_id(QString id, bool silent, std::list<pv::dat
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_CONFIRM_DEL_ALL), "Are you sure to remove all decoder?"), this)){
|
QString strMsg(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_CONFIRM_DEL_ALL), "Are you sure to remove all decoder?"));
|
||||||
del_all_protocol();
|
if (MsgBox::Confirm(strMsg, this)){
|
||||||
|
del_all_protocol();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -842,8 +843,10 @@ void ProtocolDock::OnProtocolSetting(void *handle){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ProtocolDock::OnProtocolDelete(void *handle){
|
void ProtocolDock::OnProtocolDelete(void *handle){
|
||||||
if (!MsgBox::Confirm(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_CONFIRM_DEL), "Are you sure to remove this decoder?"), this)){
|
QString strMsg(L_S(STR_PAGE_MSG, S_ID(IDS_MSG_DECODER_CONFIRM_DEL), "Are you sure to remove this decoder?"));
|
||||||
return;
|
|
||||||
|
if (!MsgBox::Confirm(strMsg, this)){
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto it = _protocol_lay_items.begin(); it != _protocol_lay_items.end(); it++)
|
for (auto it = _protocol_lay_items.begin(); it != _protocol_lay_items.end(); it++)
|
||||||
|
@ -85,7 +85,7 @@ void MsgBox::Show(const QString title, const QString text, const QString infoTex
|
|||||||
|
|
||||||
bool MsgBox::Confirm(const QString text, QWidget *parent)
|
bool MsgBox::Confirm(const QString text, QWidget *parent)
|
||||||
{
|
{
|
||||||
MsgBox::Confirm(text, "", parent);
|
return MsgBox::Confirm(text, "", parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MsgBox::Confirm(const QString text, const QString infoText, QWidget *parent)
|
bool MsgBox::Confirm(const QString text, const QString infoText, QWidget *parent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user