Filter löschen
Filter löschen

Shift of focus when script creates window.

6 Ansichten (letzte 30 Tage)
Alan
Alan am 23 Dez. 2021
Beantwortet: Image Analyst am 23 Dez. 2021
I have noticed a difference in behavior between R2018b and R2021b.
When running a script with cells which creates a figure (undocked), in R2018b the focus stays with the script, so I am able to continue to the next cell/section using Shift-CMD-Return. In R2021b the focus moves to the figure window, so I have to take my hands off the keyboard, find the mouse, click on the Editor window, then use Shift-CMD-Return to run the next cell. This is a really annoying.
How do I revert to default behavior of R2018b?

Antworten (1)

Image Analyst
Image Analyst am 23 Dez. 2021
I don't think it's the version. I notice that sometimes (in r2021b) I can batch process images and switch away and work in another program just fine with no focus stealing. However sometimes I can't because my MATLAB app steals focus back for some reason.
I haven't been able yet to figure out exactly why but I think it has to do with me interacting with the editor window. Like if I just run it, then there's no stealing focus but if I set a breakpoint in it or something like that, then it will steal focus every time it has to update the display, like with axes(), figure(), or imshow() or something. So I just try to avoid doing anything with the editor once I open the code -- I just run it immediately. Sorry, I wish I knew the exact reason why it steal focus or not.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by