[apps/code][python] ConsoleController doesn't keep any pointer/boolean to know

if the sandbox/matplotlib view controller is displayed. Its state won't be
always right; instead, use the StackViewController depth.

This fixes the following bug: when popping the sandbox/matplotlib view
controller, the first responder token was not given to the console
controller!
This commit is contained in:
Émilie Feral
2020-03-26 09:42:36 +01:00
parent d0c5ac0343
commit fb3f6ab6f3
9 changed files with 35 additions and 54 deletions

View File

@@ -82,6 +82,7 @@ private:
static constexpr int k_numberOfLineCells = (Ion::Display::Height - Metric::TitleBarHeight) / 14 + 2; // 14 = KDFont::SmallFont->glyphSize().height()
// k_numberOfLineCells = (240 - 18)/14 ~ 15.9. The 0.1 cell can be above and below the 15 other cells so we add +2 cells.
static constexpr int k_outputAccumulationBufferSize = 100;
bool isDisplayingViewController();
bool reloadData(bool isEditing);
void flushOutputAccumulationBufferToStore();
void appendTextToOutputAccumulationBuffer(const char * text, size_t length);