Skip to content

Improve selection action toggle code

@broulik noticed an issue in the code. This commit fixes it.


Before this commit there was a QObject::disconnect call that did nothing (because it had nullptr as the first parameter) and there was a QObject::connect call that created the same connections multiple times because of this.

This had no effect on end users. However such code can lead to issues in the future e.g. if we ever had a situation in which the selection mode could be toggled for an inactive view container.

This commit solves this by replacing the QObject::disconnect call with one that works. The QObject::connect call is moved so there won't be multiple connections of the same type.

Edited by Felix Ernst

Merge request reports