This repository has been archived on 2025-12-24. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
yachat/qt-patches/001-all-all-don't emit signals when clearing selection.patch

21 lines
918 B
Diff
Raw Normal View History

2025-12-25 01:37:49 +05:00
diff -urN qt-x11-opensource-src-4.3.5.orig/src/gui/itemviews/qitemselectionmodel.cpp qt-x11-opensource-src-4.3.5/src/gui/itemviews/qitemselectionmodel.cpp
--- qt-x11-opensource-src-4.3.5.orig/src/gui/itemviews/qitemselectionmodel.cpp 2008-09-02 16:12:14.000000000 +0400
+++ qt-x11-opensource-src-4.3.5/src/gui/itemviews/qitemselectionmodel.cpp 2008-09-02 18:08:15.000000000 +0400
@@ -1058,10 +1058,14 @@
if (d->ranges.count() == 0 && d->currentSelection.count() == 0)
return;
QItemSelection selection = d->ranges;
- selection.merge(d->currentSelection, d->currentCommand);
+ if (!signalsBlocked()) {
+ selection.merge(d->currentSelection, d->currentCommand);
+ }
d->ranges.clear();
d->currentSelection.clear();
- emit selectionChanged(QItemSelection(), selection);
+ if (!signalsBlocked()) {
+ emit selectionChanged(QItemSelection(), selection);
+ }
}