Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CATROID-1479 Test: testFunctionDeletion fails #4660

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ public FormulaEditorHistory getHistory() {
}

public boolean isThereSomethingToDelete() {
if (internFormula == null) {
return false;
}
return internFormula.isThereSomethingToDelete();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ public void onPrepareOptionsMenu(Menu menu) {
menu.findItem(R.id.menu_redo).setVisible(true);

super.onPrepareOptionsMenu(menu);
updateButtonsOnKeyboard();
}

@Override
Expand Down Expand Up @@ -1076,7 +1077,10 @@ public void onHiddenChanged(boolean hidden) {

public void updateButtonsOnKeyboardAndInvalidateOptionsMenu() {
getActivity().invalidateOptionsMenu();
updateButtonsOnKeyboard();
}

public void updateButtonsOnKeyboard() {
ImageButton backspaceOnKeyboard = getActivity().findViewById(R.id.formula_editor_keyboard_delete);
if (!formulaEditorEditText.isThereSomethingToDelete()) {
backspaceOnKeyboard.setAlpha(255 / 3);
Expand Down