[gitg/wip/patch-stage] Correctly update selection when clearing diff
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/patch-stage] Correctly update selection when clearing diff
- Date: Thu, 2 Jan 2014 12:38:20 +0000 (UTC)
commit 4ca88e57980618a785f9cfc1b007879466880837
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Thu Jan 2 13:37:53 2014 +0100
Correctly update selection when clearing diff
libgitg/resources/diff-view.js | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/libgitg/resources/diff-view.js b/libgitg/resources/diff-view.js
index cb0a9db..c976555 100644
--- a/libgitg/resources/diff-view.js
+++ b/libgitg/resources/diff-view.js
@@ -173,7 +173,6 @@ function update_has_selection()
has_selection = hs;
var v = has_selection ? "yes" : "no";
-
xhr_get('internal', {action: 'selection-changed', value: v});
}
}
@@ -333,8 +332,6 @@ function xhr_get(action, data, onload)
function update_diff(id, lsettings)
{
- current_diff = id;
-
if (html_builder_worker)
{
html_builder_worker.terminate();
@@ -345,9 +342,12 @@ function update_diff(id, lsettings)
if (typeof id == 'undefined')
{
content.empty();
+ update_has_selection();
return;
}
+ current_diff = id;
+
if (typeof lsettings != 'undefined')
{
$.extend(settings, lsettings);
@@ -375,6 +375,8 @@ function update_diff(id, lsettings)
' + settings.strings.loading_diff + '\
</div>\
');
+
+ update_has_selection();
}
html_builder_progress_timeout = 0;
@@ -401,6 +403,7 @@ function update_diff(id, lsettings)
}
content.html(event.data.diff_html);
+ update_has_selection();
$(".expander").click(expand_collapse);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]