mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 09:56:59 +00:00
Clear console text even when we close it with ESC key
This commit is contained in:
parent
865e0d7ee6
commit
23059c6309
@ -72,11 +72,13 @@ Console::Console(Context* ctx)
|
|||||||
|
|
||||||
// The "button" closes the console
|
// The "button" closes the console
|
||||||
button->processMnemonicFromText();
|
button->processMnemonicFromText();
|
||||||
button->Click.connect(
|
button->Click.connect(base::Bind<void>(&Window::closeWindow, window, button));
|
||||||
|
|
||||||
|
// When the window is closed, we clear the text
|
||||||
|
window->Close.connect(
|
||||||
base::Bind<void>(
|
base::Bind<void>(
|
||||||
[window, button, textbox] {
|
[textbox] {
|
||||||
textbox->setText(std::string());
|
textbox->setText(std::string());
|
||||||
window->closeWindow(button);
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
view->attachToView(textbox);
|
view->attachToView(textbox);
|
||||||
|
Loading…
Reference in New Issue
Block a user