Skip to content

Commit

Permalink
fix tiny visual bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxshao committed Jan 22, 2022
1 parent fce159e commit 18f7b91
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/editor/views/MeasureView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,11 @@ static void updateStatePositions(EditState &edit_state,
int row = (y - UNIT_EDIT_Y) / UNIT_EDIT_INCREMENT;
int offset_y = (y - UNIT_EDIT_Y) % UNIT_EDIT_INCREMENT;
const auto &rows = unit_draw_params_map.rows;
state.kind = MouseMeasureEdit{
(int(rows.size()) > row ? rows[row] : MeasureUnitEdit{}), offset_y};
if (int(rows.size()) > row)
state.kind = MouseMeasureEdit{MeasureUnitEdit{rows[row]}, offset_y};
else
state.kind =
MouseMeasureEdit{MeasureUnitEdit{}, UNIT_EDIT_INCREMENT - 1};
}
} break;

Expand Down

0 comments on commit 18f7b91

Please sign in to comment.