Skip to content

Commit 2476a85

Browse files
authored
Merge pull request #152 from mathworks/150-baseviewchart-and-baseviewcontroller-constructor-not-calling-onmodelset-for-model-passed-as-constructor-input-pairs
150 baseviewchart and baseviewcontroller constructor not calling onmodelset for model passed as constructor input pairs
2 parents 4d8a465 + 8a1e91e commit 2476a85

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

widgets/+wt/+abstract/BaseViewChart.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,11 @@
5151
end
5252

5353
% Call superclass constructors
54-
obj = [email protected](parent, varargin{:});
55-
54+
% ModelObserver is first to establish model set listeners
55+
% before assigning inputs
56+
57+
[email protected](parent, varargin{:});
58+
5659

5760
end %function
5861
end %methods

widgets/+wt/+abstract/BaseViewController.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@
6666
% Constructor
6767

6868
% Call superclass constructors
69-
obj = [email protected](varargin{:});
70-
69+
% ModelObserver is first to establish model set listeners
70+
% before assigning inputs
71+
72+
[email protected](varargin{:});
7173

7274
% Listen to theme changes (R2025a and later only)
7375
if ~isMATLABReleaseOlderThan("R2025a")

0 commit comments

Comments
 (0)