Cabana: delete all selected cells when shrinking signal (#26211)

pull/26216/head
Dean Lee 3 years ago committed by GitHub
parent 80c565d9fe
commit 64f89beb0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tools/cabana/binaryview.cc

@ -86,7 +86,8 @@ void BinaryView::mouseReleaseEvent(QMouseEvent *event) {
if (auto sig = getResizingSignal()) { if (auto sig = getResizingSignal()) {
auto [sig_from, sig_to] = getSignalRange(sig); auto [sig_from, sig_to] = getSignalRange(sig);
if (from >= sig_from && to <= sig_to) { // reduce size if (from >= sig_from && to <= sig_to) { // reduce size
emit(from == sig_from ? resizeSignal(sig, to, sig_to) : resizeSignal(sig, sig_from, from)); emit(from == sig_from ? resizeSignal(sig, std::min(to + 1, sig_to), sig_to)
: resizeSignal(sig, sig_from, std::max(from - 1, sig_from)));
} else { // increase size } else { // increase size
emit resizeSignal(sig, std::min(from, sig_from), std::max(to, sig_to)); emit resizeSignal(sig, std::min(from, sig_from), std::max(to, sig_to));
} }

Loading…
Cancel
Save