void Entry::set_text(const string &t)
{
- text = t;
+ if(t!=text.get())
+ {
+ text = t;
+ signal_text_changed.emit(text.get());
+ }
set_edit_position(text.size());
}
else if(row>=first_row+visible_rows)
first_row = row+1-visible_rows;
+ unsigned scroll = max(text.get_n_lines(), visible_rows)-visible_rows;
+ if(first_row>scroll)
+ first_row = scroll;
+
if(first_row!=old_first_row)
signal_scroll_position_changed.emit(first_row);
- unsigned scroll = max(text.get_n_lines(), visible_rows)-visible_rows;
slider->set_range(0, scroll);
slider->set_value(scroll-first_row);
}