mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 07:31:18 +00:00
Let the backspace also delete the selection.
Baufo wondered why the backspace doesn't delete the selection, like the delete key. Not sure why I implemented the current behaviour and tested with various application, which all delete the selection on the backspace. So also implemented that behaviour for the new widgets.
This commit is contained in:
parent
68bcc66d53
commit
c6fb8ef694
@ -22,6 +22,7 @@ Version 1.5.7+svn:
|
||||
* Added the sunset feature to the new dialogs.
|
||||
* Fix the calculate feature in the test scenario.
|
||||
* Fix an endian issue which rendered text wrong on big endian machines.
|
||||
* A backspace in a textbox with selection, now clears the selection.
|
||||
|
||||
Version 1.5.7:
|
||||
* Campaigns:
|
||||
|
@ -369,7 +369,9 @@ void ttext_::handle_key_backspace(SDLMod /*modifier*/, bool& handled)
|
||||
DBG_G_E << "Text: key press: backspace.\n";
|
||||
|
||||
handled = true;
|
||||
if(selection_start_){
|
||||
if(selection_length_ != 0) {
|
||||
delete_selection();
|
||||
} else if(selection_start_){
|
||||
delete_char(true);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user