Update label of window form only if it exists
The update of label was introduced in 89834116fe97 but the label is defined only when the window form is created with the view type tree. Closes #13994
This commit is contained in:
+3
-1
@@ -416,7 +416,9 @@
|
||||
}
|
||||
}
|
||||
let message = name + '/' + Sao.common.humanize(size);
|
||||
this.label.text(message).attr('title', message);
|
||||
if (this.label) {
|
||||
this.label.text(message).attr('title', message);
|
||||
}
|
||||
this._set_button_sensitive();
|
||||
},
|
||||
record_modified: function() {
|
||||
|
||||
@@ -365,7 +365,8 @@ class WinForm(NoModal, InfoBar):
|
||||
if selected > 1:
|
||||
name += '#%i' % selected
|
||||
name = '(%s/%s)' % (name, common.humanize(size))
|
||||
self.label.set_text(name)
|
||||
if hasattr(self, 'label'):
|
||||
self.label.set_text(name)
|
||||
self._set_button_sensitive()
|
||||
|
||||
def record_modified(self, *args):
|
||||
|
||||
Reference in New Issue
Block a user