Skip to content

Commit 00bf74d

Browse files
author
alcomposer
committed
Fix drag area extending into button area
1 parent 076eadf commit 00bf74d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Sidebar/Sidebar.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ void Sidebar::mouseDrag(MouseEvent const& e)
241241

242242
setBounds(getParentWidth() - newWidth, getY(), newWidth, getHeight());
243243
getParentComponent()->resized();
244-
} else if (isDraggingDivider) {
244+
} else if (isDraggingDivider && !inspector->isEmpty()) {
245245
auto const newDividerY = static_cast<float>(jlimit(30, getHeight() - 30, e.getEventRelativeTo(this).getPosition().y - dragOffset));
246246
dividerFactor = newDividerY / getHeight();
247247
resized();
@@ -266,7 +266,7 @@ void Sidebar::mouseMove(MouseEvent const& e)
266266

267267
if (resizeCursor)
268268
e.originalComponent->setMouseCursor(MouseCursor::LeftRightResizeCursor);
269-
else if (inspectorButton.isInspectorPinned() && resizeVertical) {
269+
else if (inspectorButton.isInspectorPinned() && resizeVertical && !inspector->isEmpty() && e.getPosition().getX() < (getWidth() - 30)) {
270270
isDraggingDivider = true;
271271
e.originalComponent->setMouseCursor(MouseCursor::UpDownResizeCursor);
272272
} else

0 commit comments

Comments
 (0)