fixed bug #1809786
This commit is contained in:
parent
72130f350e
commit
c7d4438d91
2 changed files with 8 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 1.0.1:
|
||||
*07/10/18:
|
||||
* Fixed gcc 2.96 compile problem ( Thanks rumpole at hotmail )
|
||||
bug #1809786
|
||||
src/FbTk/TextBox.cc
|
||||
*07/10/15:
|
||||
* Added OnWindow modifier to keys file (Mark)
|
||||
Keys.cc Window.cc Screen.cc CurrentWindowCmd.cc
|
||||
|
|
|
@ -203,7 +203,10 @@ void TextBox::buttonPressEvent(XButtonEvent &event) {
|
|||
int delta = width();
|
||||
int tmp = 0;
|
||||
for(i = m_start_pos; i <= m_end_pos; i++) {
|
||||
tmp = abs(event.x - font().textWidth(m_text.c_str() + m_start_pos, i - m_start_pos));
|
||||
tmp = abs(static_cast<int>
|
||||
(event.x - font().
|
||||
textWidth(m_text.c_str() + m_start_pos,
|
||||
i - m_start_pos)));
|
||||
|
||||
if (tmp < delta) {
|
||||
delta = tmp;
|
||||
|
|
Loading…
Reference in a new issue