[gnome-documents] selection: don't emit selection-check if we're not frozen



commit 6bae76c41a3a70d9725b924e0e63406f182f6104
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 29 18:46:05 2011 -0400

    selection: don't emit selection-check if we're not frozen
    
    There's no harm in calling freezeSelection(false) if we're not frozen,
    just return.
    This fixes a jumpy behavior when an item is selected in the view and the
    Load more documents button is pressed.

 src/selectionController.js |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/selectionController.js b/src/selectionController.js
index e245db6..cecee59 100644
--- a/src/selectionController.js
+++ b/src/selectionController.js
@@ -43,6 +43,9 @@ SelectionController.prototype = {
     },
 
     freezeSelection: function(freeze) {
+        if (freeze == this._isFreezed)
+            return;
+
         this._isFreezed = freeze;
 
         if (!this._isFreezed)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]