[IMP] Improved pus/load state in diagram
bzr revid: fme@openerp.com-20121022083617-j1xuwhtywmxcqh3k
This commit is contained in:
commit
7dc44d561f
|
@ -117,12 +117,27 @@ instance.web.DiagramView = instance.web.View.extend({
|
|||
|
||||
on_diagram_loaded: function(record) {
|
||||
var id_record = record['id'];
|
||||
if(id_record) {
|
||||
if (id_record) {
|
||||
this.id = id_record;
|
||||
this.get_diagram_info();
|
||||
this.do_push_state({id: id_record});
|
||||
} else {
|
||||
this.do_push_state({});
|
||||
}
|
||||
},
|
||||
|
||||
do_load_state: function(state, warm) {
|
||||
if (state && state.id) {
|
||||
if (!this.dataset.get_id_index(state.id)) {
|
||||
this.dataset.ids.push(state.id);
|
||||
}
|
||||
this.dataset.select_id(state.id);
|
||||
if (warm) {
|
||||
this.do_show();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Set-up the drawing elements of the diagram
|
||||
draw_diagram: function(result) {
|
||||
var self = this;
|
||||
|
|
Loading…
Reference in New Issue