mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[solver] Fix update of the button message between: 'Solve the equation'
and 'Solve the system'
This commit is contained in:
@@ -27,6 +27,10 @@ Button * ButtonRowController::ContentView::buttonAtIndex(int index) const {
|
||||
return m_delegate->buttonAtIndex(index, m_position);
|
||||
}
|
||||
|
||||
void ButtonRowController::ContentView::reload() {
|
||||
markRectAsDirty(bounds());
|
||||
}
|
||||
|
||||
int ButtonRowController::ContentView::numberOfSubviews() const {
|
||||
return numberOfButtons() + 1;
|
||||
}
|
||||
@@ -178,6 +182,14 @@ bool ButtonRowController::setSelectedButton(int selectedButton) {
|
||||
return m_contentView.setSelectedButton(selectedButton, application);
|
||||
}
|
||||
|
||||
void ButtonRowController::setMessageOfButtonAtIndex(I18n::Message message, int index) {
|
||||
if (m_contentView.numberOfButtons() > index) {
|
||||
m_contentView.buttonAtIndex(0)->setMessage(message);
|
||||
m_contentView.layoutSubviews();
|
||||
m_contentView.reload();
|
||||
}
|
||||
}
|
||||
|
||||
bool ButtonRowController::handleEvent(Ion::Events::Event event) {
|
||||
if (event == Ion::Events::Left) {
|
||||
if (m_contentView.selectedButton() == 0) {
|
||||
|
||||
Reference in New Issue
Block a user