[FIX] web: view_manager: update control panel on title change
only if the control panel if visible.
This fixes a bug on the settings view (form view), on which the control panel
is hidden (the bar containing 'Apply' and 'Cancel' is unfortunately not a true
control panel). When clicking on 'Apply', for some weird reason, the event
'change:title' is triggered and the control panel is updated with the new title
('New'). However, as the flags hidden isn't mentionned, the control panel
visibility is toggled.
This commit is contained in:
@@ -218,7 +218,7 @@ var ViewManager = Widget.extend(ControlPanelMixin, {
|
||||
if (self.action_manager) self.action_manager.trigger('history_back');
|
||||
});
|
||||
controller.on("change:title", this, function() {
|
||||
if (self.action_manager) {
|
||||
if (self.action_manager && !self.flags.headless) {
|
||||
var breadcrumbs = self.action_manager.get_breadcrumbs();
|
||||
self.update_control_panel({breadcrumbs: breadcrumbs}, {clear: false});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user