[gnome-documents] preview: don't recreate a new view every time
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] preview: don't recreate a new view every time
- Date: Fri, 15 Feb 2013 15:59:44 +0000 (UTC)
commit 0d83da59351af0f90d8dcc278d8a18da655b2045
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Feb 15 10:58:57 2013 -0500
preview: don't recreate a new view every time
This implicitly helps for crossfades since, before the view would get
destroyed while the animation was still in-flight.
src/embed.js | 2 --
src/preview.js | 2 --
2 files changed, 0 insertions(+), 4 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index 159e31d..b60ad78 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -422,8 +422,6 @@ const Embed = new Lang.Class({
// pack the toolbar
this._toolbar = new Preview.PreviewToolbar(this._preview);
this.widget.pack_start(this._toolbar.widget, false, false, 0);
-
- this._stack.set_visible_child_name('preview');
},
_prepareForEdit: function() {
diff --git a/src/preview.js b/src/preview.js
index 54a5417..10fe697 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -461,7 +461,6 @@ const PreviewView = new Lang.Class({
return;
if (this.view) {
- this.view.destroy();
this.controlsVisible = false;
this._lastSearch = '';
}
@@ -469,7 +468,6 @@ const PreviewView = new Lang.Class({
this._model = model;
if (this._model) {
- this._createView();
this.view.set_model(this._model);
this._navBar.setModel(model);
this._model.connect('page-changed', Lang.bind(this, this._onPageChanged));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]