Permalink
3 comments
on commit
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add easy methods for temporarily blocking signals
- QgsSignalBlocker: RAII signal blocking class. Used for temporarily blocking signals from a QObject for the lifetime of QgsSignalBlocker object. - easy shortcut "whileBlocking( QObject* )" function. Temporarily blocks signals from a QObject while calling a single method from the object. Usage: whileBlocking( checkBox )->setChecked( true ); whileBlocking( spinBox )->setValue( 50 ); No signals will be emitted when calling these methods. based on Boojum's code from http://stackoverflow.com/questions/3556687/prevent-firing-signals-in-qt
- Loading branch information
Showing
with
143 additions
and 74 deletions.
This comment has been minimized.
Well that is pretty bloody sweet! Nice work
This comment has been minimized.
Well... truth is I just made good use of this book: http://www.goodreads.com/book/show/29437996-copying-and-pasting-from-stack-overflow
This comment has been minimized.
:)