From 0a1aac862f0f7943843e621a11c2f579bfaac647 Mon Sep 17 00:00:00 2001 From: Siegfried-Angel Gevatter Pujals Date: Fri, 31 Jul 2009 16:08:39 +0200 Subject: [PATCH] Fix details pane repositioning Two calls to _repositionDetails() were done too early, before the visibility of the results pane had changed, so they had no effect. Thus when a search was done while a details pane was active, the pane with the results was hidden by the details pane. In addition to fixing this, move the two remaining calls to the line after changing the results pane's visibility to make it clearer why the calls are there. --- js/ui/overlay.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/js/ui/overlay.js b/js/ui/overlay.js index 2741040c3..b2156af47 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -583,9 +583,9 @@ Dash.prototype = { this._resultsAppsSection.display.show(); this._resultsPane.append(this._resultsAppsSection.actor, Big.BoxPackFlags.EXPAND); this._resultsPane.show(); + this._repositionDetails(); this._moreAppsLink.setText("Less..."); - this._repositionDetails(); this.emit('panes-displayed'); }, @@ -617,11 +617,10 @@ Dash.prototype = { this._resultsDocsSection.display.show(); this._resultsPane.append(this._resultsDocsSection.actor, Big.BoxPackFlags.EXPAND); this._resultsPane.show(); + this._repositionDetails(); this._moreDocsLink.setText("Less..."); - this._repositionDetails(); - this.emit('panes-displayed'); }, @@ -642,7 +641,6 @@ Dash.prototype = { }, _setSearchMode: function() { - this._repositionDetails(); if (this._resultsShowing()) return; @@ -656,17 +654,18 @@ Dash.prototype = { this._resultsPane.append(this._resultsDocsSection.actor, Big.BoxPackFlags.EXPAND); this._resultsPane.show(); + this._repositionDetails(); this.emit('panes-displayed'); }, _unsetSearchMode: function() { - this._repositionDetails(); if (this._moreDocsMode || this._moreAppsMode || !this._resultsShowing()) return; this._resultsPane.hide(); + this._repositionDetails(); this._resultsPane.remove_actor(this._resultsAppsSection.actor); this._resultsAppsSection.display.hide();