Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
MATLAB window now resets itself on codec receipt only if new codec di…
Browse files Browse the repository at this point in the history
…ffers from old one
  • Loading branch information
cstawarz committed Apr 6, 2015
1 parent f6ecb0f commit bdf5a53
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion MATLABWindow/MWMATLABWindowController.m
Expand Up @@ -317,10 +317,17 @@ - (void) appendLogTextMain:(NSString *)logText {

- (void)codecArrived:(MWCocoaEvent *)event {
[matlabLock lock];

Datum *new_codec = [event data];

if (*new_codec == *savedCodec) {
// Codec is unchanged. No need to reset anything.
[matlabLock unlock];
return;
}

// need to force it by capturing the pointer so it makes it a dictionary
delete savedCodec;
Datum *new_codec = [event data];
savedCodec = new Datum(*new_codec);

NSArray *current_selected_variables = [NSArray array];
Expand Down

0 comments on commit bdf5a53

Please sign in to comment.