diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/TextBox.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc index 460db7e..a23f9a6 100644 --- a/src/FbTk/TextBox.cc +++ b/src/FbTk/TextBox.cc | |||
@@ -19,7 +19,7 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: TextBox.cc,v 1.10 2004/07/15 13:48:54 fluxgen Exp $ | 22 | // $Id: TextBox.cc,v 1.11 2004/08/11 12:41:28 fluxgen Exp $ |
23 | 23 | ||
24 | #include "TextBox.hh" | 24 | #include "TextBox.hh" |
25 | #include "Font.hh" | 25 | #include "Font.hh" |
@@ -278,7 +278,10 @@ void TextBox::adjustEndPos() { | |||
278 | } | 278 | } |
279 | 279 | ||
280 | void TextBox::adjustStartPos() { | 280 | void TextBox::adjustStartPos() { |
281 | int text_width = font().textWidth(text().c_str() + m_start_pos, m_end_pos - m_start_pos); | 281 | // reset global start po |
282 | m_start_pos = 0; | ||
283 | |||
284 | int text_width = font().textWidth(text().c_str(), m_end_pos); | ||
282 | if (text_width < static_cast<signed>(width())) | 285 | if (text_width < static_cast<signed>(width())) |
283 | return; | 286 | return; |
284 | 287 | ||