[gnome-documents/gnome-3-2] selection: don't emit selection-check if we're not frozen
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/gnome-3-2] selection: don't emit selection-check if we're not frozen
- Date: Thu, 29 Sep 2011 22:50:34 +0000 (UTC)
commit 06cca557edcc5d01c24967e396da623dd434055b
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]