Prohibited adding decoder during the collection process

This commit is contained in:
dreamsourcelabTAI 2023-04-04 16:19:33 +08:00
parent 86c6923882
commit 62329baf59
3 changed files with 11 additions and 0 deletions

View File

@ -1004,5 +1004,13 @@ bool ProtocolDock::protocol_sort_callback(const DecoderInfoItem *o1, const Decod
decoded_progress(0);
}
void ProtocolDock::update_view_status()
{
bool bEnable = _session->is_working() == false;
_pro_keyword_edit->setEnabled(bEnable);
_pro_add_button->setEnabled(bEnable);
_pro_search_button->setEnabled(bEnable);
}
} // namespace dock
} // namespace pv

View File

@ -85,6 +85,7 @@ public:
bool add_protocol_by_id(QString id, bool silent, std::list<pv::data::decode::Decoder*> &sub_decoders);
void reset_view();
void update_view_status();
private:
void changeEvent(QEvent *event);

View File

@ -1659,12 +1659,14 @@ namespace pv
case DSV_MSG_START_COLLECT_WORK:
update_toolbar_view_status();
_view->on_state_changed(false);
_protocol_widget->update_view_status();
break;
case DSV_MSG_COLLECT_END:
prgRate(0);
_view->repeat_unshow();
_view->on_state_changed(true);
_protocol_widget->update_view_status();
break;
case DSV_MSG_END_COLLECT_WORK: