X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fviews%2Fdecoder_output%2Fview.cpp;h=325fa716db78bd1800bce41c249770aac009d28a;hb=ec4f16ff84c688f2572c6e3d2e2184aee95f46f7;hp=775f6daf92a8d1ebe9b10f56eed98da1b7a25770;hpb=d5645564896bd753551b2ad814cefafd4e29a6d4;p=pulseview.git diff --git a/pv/views/decoder_output/view.cpp b/pv/views/decoder_output/view.cpp index 775f6daf..325fa716 100644 --- a/pv/views/decoder_output/view.cpp +++ b/pv/views/decoder_output/view.cpp @@ -238,14 +238,14 @@ void View::update_data() if (!signal_) return; - if (!binary_data_exists_) - return; - const DecodeBinaryClass* bin_class = signal_->get_binary_data_class(current_segment_, decoder_, bin_class_id_); hex_view_->set_data(bin_class); + if (!binary_data_exists_) + return; + if (!save_button_->isEnabled()) save_button_->setEnabled(true); } @@ -316,11 +316,11 @@ void View::save_data_as_hex_dump(bool with_offset, bool with_ascii) const QTextStream out_stream(&file); uint64_t offset = selection.first; - unsigned int n = hex_view_->get_bytes_per_line(); + uint64_t n = hex_view_->get_bytes_per_line(); QString s; while (offset < selection.second) { - size_t end = std::min(selection.second, offset + n); + size_t end = std::min((uint64_t)(selection.second), offset + n); offset = hex_view_->create_hex_line(offset, end, &s, with_offset, with_ascii); out_stream << s << endl; }