Skip to content

Commit 4977f45

Browse files
committed
editor: remove static state from debounced resizing logic, move it to member variable
1 parent 6a68137 commit 4977f45

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/app/PluginEditor.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ PluginEditor::resized()
167167
p.setSizeFactor(newSize);
168168

169169
// Debounced resizing logic
170-
static bool firstDraw = true;
171170
if (firstDraw) {
172171
// On first draw, skip debounce and just layout normally
173172
compositor.setBounds(getLocalBounds());

src/app/PluginEditor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class PluginEditor
4646
int lastHeight = baseHeight;
4747
double ratio = baseWidth / baseHeight;
4848
float& sizeFactor = p.sizeFactor;
49+
bool firstDraw = true;
4950
//==============================================================================
5051
Image image;
5152
bool isResizing = false;

0 commit comments

Comments
 (0)