fixed potential compilation issue
This commit is contained in:
committed by
Raphael Coeffic
parent
6c16afa28b
commit
47585b8829
@@ -18,31 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
#include "keyboard_base.h"
|
#include "keyboard_base.h"
|
||||||
|
|
||||||
void Keyboard::hide()
|
|
||||||
{
|
|
||||||
if (activeKeyboard) {
|
|
||||||
activeKeyboard->clearField();
|
|
||||||
activeKeyboard = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Keyboard::clearField()
|
|
||||||
{
|
|
||||||
detach();
|
|
||||||
if (fields) {
|
|
||||||
fields->setHeight(oldHeight);
|
|
||||||
fields = nullptr;
|
|
||||||
}
|
|
||||||
if (fieldContainer) {
|
|
||||||
fieldContainer->setHeight(LCD_H - 0 - fieldContainer->top());
|
|
||||||
fieldContainer = nullptr;
|
|
||||||
}
|
|
||||||
if (field) {
|
|
||||||
field->setEditMode(false);
|
|
||||||
field = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
coord_t calcScrollOffsetForField(FormField *newField, Window *topWindow)
|
coord_t calcScrollOffsetForField(FormField *newField, Window *topWindow)
|
||||||
{
|
{
|
||||||
// now we need to calculate the offset of the field in the fields scroll container
|
// now we need to calculate the offset of the field in the fields scroll container
|
||||||
|
|||||||
+25
-2
@@ -29,7 +29,31 @@ class Keyboard: public FormWindow
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hide();
|
void clearField()
|
||||||
|
{
|
||||||
|
detach();
|
||||||
|
if (fields) {
|
||||||
|
fields->setHeight(oldHeight);
|
||||||
|
fields = nullptr;
|
||||||
|
}
|
||||||
|
if (fieldContainer) {
|
||||||
|
fieldContainer->setHeight(LCD_H - 0 - fieldContainer->top());
|
||||||
|
fieldContainer = nullptr;
|
||||||
|
}
|
||||||
|
if (field) {
|
||||||
|
field->setEditMode(false);
|
||||||
|
field = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void hide()
|
||||||
|
{
|
||||||
|
if (activeKeyboard) {
|
||||||
|
activeKeyboard->clearField();
|
||||||
|
activeKeyboard = nullptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static Keyboard * activeKeyboard;
|
static Keyboard * activeKeyboard;
|
||||||
@@ -39,7 +63,6 @@ class Keyboard: public FormWindow
|
|||||||
coord_t oldHeight = 0;
|
coord_t oldHeight = 0;
|
||||||
|
|
||||||
void setField(FormField *newField);
|
void setField(FormField *newField);
|
||||||
void clearField();
|
|
||||||
Window *getFieldContainer(FormField * field);
|
Window *getFieldContainer(FormField * field);
|
||||||
void attachKeyboard();
|
void attachKeyboard();
|
||||||
FormWindow *findFormWindow();
|
FormWindow *findFormWindow();
|
||||||
|
|||||||
Reference in New Issue
Block a user