Missing invalidate

This commit is contained in:
Bertrand Songis
2020-04-16 12:39:08 +02:00
parent 1fbc4a617d
commit b4077e9b5b
3 changed files with 18 additions and 2 deletions
+8 -1
View File
@@ -28,6 +28,13 @@ class ExpansionPanelHeader: virtual public FormGroup {
public: public:
explicit ExpansionPanelHeader(ExpansionPanel * parent); explicit ExpansionPanelHeader(ExpansionPanel * parent);
#if defined(DEBUG_WINDOWS)
std::string getName() override
{
return "ExpansionPanelHeader";
}
#endif
void onEvent(event_t event) override; void onEvent(event_t event) override;
#if defined(HARDWARE_TOUCH) #if defined(HARDWARE_TOUCH)
@@ -48,7 +55,7 @@ class ExpansionPanel: public FormGroup {
#if defined(DEBUG_WINDOWS) #if defined(DEBUG_WINDOWS)
std::string getName() override std::string getName() override
{ {
return "ExpansionPanel()"; return "ExpansionPanel";
} }
#endif #endif
+5
View File
@@ -111,6 +111,11 @@ class FormGroup: public FormField {
void addField(FormField * field, bool front = false); void addField(FormField * field, bool front = false);
void setLastField(FormField * field)
{
last = field;
}
protected: protected:
FormField * first = nullptr; FormField * first = nullptr;
FormField * last = nullptr; FormField * last = nullptr;
+5 -1
View File
@@ -273,8 +273,12 @@ class Window {
} }
else { else {
coord_t maxScrollPosition = h - height(); coord_t maxScrollPosition = h - height();
if (scrollPositionY > maxScrollPosition) if (scrollPositionY > maxScrollPosition) {
setScrollPositionY(maxScrollPosition); setScrollPositionY(maxScrollPosition);
}
else {
invalidate();
}
} }
} }