Skip to content

Commit

Permalink
fix(Studio): Refocus editor when left-clicking it
Browse files Browse the repository at this point in the history
  • Loading branch information
psyGamer committed Dec 27, 2024
1 parent f3a5197 commit f2f866b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Studio/CelesteStudio/Editing/Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3456,6 +3456,9 @@ protected override void OnMouseDown(MouseEventArgs e) {
calculationState = null;

if (e.Buttons.HasFlag(MouseButtons.Primary)) {
// Refocus in case something unfocused the editor
Focus();

if (LocationToFolding(e.Location) is { } folding) {
ToggleCollapse(folding.MinRow);

Expand Down

0 comments on commit f2f866b

Please sign in to comment.