Skip to content

Commit 92e3a33

Browse files
author
Daniel Herzog
committed
Fixed and used hide-view message to deselect entry
1 parent 03bf891 commit 92e3a33

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/network/network_view.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -562,12 +562,18 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
562562
}
563563
}.bind(this);
564564

565-
this._clear_selected = function(message)
565+
this._view_hidden_bound = function(message)
566566
{
567-
this.selected = null;
568-
this.needs_instant_update = true;
569-
this.update();
570-
};
567+
if (message.id != "network-detail-overlay")
568+
return;
569+
570+
if (!this._overlay.is_active)
571+
{
572+
this.selected = null;
573+
this.needs_instant_update = true;
574+
this.update();
575+
}
576+
}.bind(this);
571577

572578
var eh = window.eventHandlers;
573579

@@ -584,6 +590,7 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
584590
messages.addListener("setting-changed", this._on_setting_changed_bound);
585591
messages.addListener("network-resource-updated", this.update.bind(this));
586592
messages.addListener("network-context-cleared", this.update.bind(this));
593+
messages.addListener("hide-view", this._view_hidden_bound);
587594
eh.click["select-network-viewmode"] = this._on_select_network_viewmode_bound;
588595
eh.click["type-filter-network-view"] = this._on_change_type_filter_bound;
589596
eh.click["profiler-mode-switch"] = this._on_toggle_network_profiler_bound;
@@ -606,7 +613,6 @@ cls.NetworkLogView = function(id, name, container_class, html, default_handler,
606613
]);
607614

608615
this._overlay = this.register_overlay(new cls.NetworkDetailOverlayView("network-detail-overlay", "network-details-view"));
609-
this._overlay.addListener("hidden", this._clear_selected.bind(this));
610616
cls.NetworkDetailOverlayView.create_ui_widgets();
611617

612618
this._type_filters = ["all"].map(this._map_filter_bound);

src/ui-scripts/overlayview.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ var OverlayViewPrototype = function()
1212

1313
this.hide = function()
1414
{
15+
this.is_active = false;
1516
var cell = window.topCell.get_cell(this.parent_view_id);
1617
if (cell)
1718
cell.hide_overlay(this.id);
18-
this.is_active = false;
19-
this.post("hidden", {});
2019
};
2120

2221
this.init = function(id, container_class, html, default_handler)

0 commit comments

Comments
 (0)