Skip to content

Commit

Permalink
Added ability to NumberInput to change limits.
Browse files Browse the repository at this point in the history
  • Loading branch information
23rd authored and john-preston committed Jun 21, 2024
1 parent a1344f5 commit 899b1db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/widgets/fields/number_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ NumberInput::NumberInput(
}
}

void NumberInput::changeLimit(int limit) {
_limit = limit;
}

void NumberInput::correctValue(
const QString &was,
int wasCursor,
Expand Down
2 changes: 2 additions & 0 deletions ui/widgets/fields/number_input.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class NumberInput final : public MaskedInputField {
const QString &value,
int limit);

void changeLimit(int limit);

protected:
void correctValue(
const QString &was,
Expand Down

0 comments on commit 899b1db

Please sign in to comment.