fix log thread bug, add clean memory button, fix pinch zoom bug, set android back button to undo
This commit is contained in:
@@ -636,6 +636,12 @@ void App::initLayout()
|
||||
ActionManager::undo();
|
||||
};
|
||||
}
|
||||
if (auto* button = layout[main_id]->find<NodeButtonCustom>("btn-clean-memory"))
|
||||
{
|
||||
button->on_click = [this](Node*) {
|
||||
ActionManager::clear();
|
||||
};
|
||||
}
|
||||
if (auto* button = layout[main_id]->find<NodeButton>("btn-clear"))
|
||||
{
|
||||
button->on_click = [this](Node*) {
|
||||
@@ -961,7 +967,7 @@ void App::update_memory_usage(size_t bytes)
|
||||
if (auto txt = layout[main_id]->find<NodeText>("txt-memory"))
|
||||
{
|
||||
static char buffer[128];
|
||||
sprintf(buffer, "History memory: %.2f Kb", bytes / 1024.f);
|
||||
sprintf(buffer, "History memory: %.2f Mb", bytes / 1024.f / 1024.f);
|
||||
txt->set_text(buffer);
|
||||
layout[main_id]->update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user