Skip to content

Commit

Permalink
Fix a possible refresh issue in the text boxes.
Browse files Browse the repository at this point in the history
When delete_selection deletes text and insert char doesn't insert
anything the widget was not properly updated. The bug was mainly
theoretical in nature.
  • Loading branch information
mordante committed Mar 15, 2014
1 parent 8a65723 commit 15121d7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/gui/widgets/text.cpp
Expand Up @@ -132,12 +132,12 @@ void ttext_::insert_char(const Uint16 unicode)
delete_selection();

if(text_.insert_unicode(selection_start_, unicode)) {

// Update status
set_cursor(selection_start_ + 1, false);
update_canvas();
set_is_dirty(true);
}

// Since delete selection might have modified the content force an update.
update_canvas();
set_is_dirty(true);
}

void ttext_::copy_selection(const bool mouse)
Expand Down

0 comments on commit 15121d7

Please sign in to comment.