[jasper/world/studio] Make mouse release only finish selection if selection is ongoing
All checks were successful
Build / build (push) Successful in 3m11s
All checks were successful
Build / build (push) Successful in 3m11s
This commit is contained in:
parent
e75c51d614
commit
6e32d36c78
@ -257,11 +257,11 @@ void WorldEditorImGui::handleSelection(ox::Size const&paneSz, float fbPaneScale)
|
||||
auto const scaledViewSz = static_cast<ox::Vec2>(m_view.drawSize()) * fbPaneScale;
|
||||
m_selTracker.updateCursorPoint(fbPtToTileAddr(fbPos, scaledViewSz), startSel);
|
||||
if (m_selTracker.selectionOngoing()) {
|
||||
m_selection.emplace(m_selTracker.selection());
|
||||
m_view.setSelection(*m_selection);
|
||||
m_view.setSelection(m_selTracker.selection());
|
||||
}
|
||||
} else if (io.MouseReleased[0]) {
|
||||
} else if (io.MouseReleased[0] && m_selTracker.selectionOngoing()) {
|
||||
m_selTracker.finishSelection();
|
||||
m_selection.emplace(m_selTracker.selection());
|
||||
}
|
||||
if (io.KeyCtrl && io.KeysDown[ImGuiKey_G]) {
|
||||
m_selection.reset();
|
||||
|
Loading…
x
Reference in New Issue
Block a user