fix(color): touch events may not work correctly in the SD file browser (#5658)
This commit is contained in:
@@ -269,6 +269,7 @@ void FileBrowser::onSelected(const char* name, bool is_dir)
|
|||||||
{
|
{
|
||||||
if (is_dir) {
|
if (is_dir) {
|
||||||
if (fileSelected) fileSelected(nullptr, nullptr, nullptr, is_dir);
|
if (fileSelected) fileSelected(nullptr, nullptr, nullptr, is_dir);
|
||||||
|
selected = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,6 +286,7 @@ void FileBrowser::onPress(const char* name, bool is_dir)
|
|||||||
if (is_dir) {
|
if (is_dir) {
|
||||||
f_chdir(fullpath);
|
f_chdir(fullpath);
|
||||||
if (fileSelected) fileSelected(nullptr, nullptr, nullptr, is_dir);
|
if (fileSelected) fileSelected(nullptr, nullptr, nullptr, is_dir);
|
||||||
|
selected = nullptr;
|
||||||
refresh();
|
refresh();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class FileBrowser : public TableField
|
|||||||
void onSelected(uint16_t row, uint16_t col) override;
|
void onSelected(uint16_t row, uint16_t col) override;
|
||||||
void onPress(uint16_t row, uint16_t col) override;
|
void onPress(uint16_t row, uint16_t col) override;
|
||||||
bool onPressLong(uint16_t row, uint16_t col) override;
|
bool onPressLong(uint16_t row, uint16_t col) override;
|
||||||
|
bool onLongPress() override { return false; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void onSelected(const char* name, bool is_dir);
|
void onSelected(const char* name, bool is_dir);
|
||||||
|
|||||||
Reference in New Issue
Block a user