mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Improved search algorithm for determining text size:
- check using previous scale, often gives correct answer when typing - binary search + bound estimation otherwise This allows the step size to be decreased, giving a better fit. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@624 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -568,7 +568,7 @@ void TextValueEditor::onValueChange() {
|
||||
}
|
||||
|
||||
void TextValueEditor::onAction(const Action& action, bool undone) {
|
||||
TextValueViewer::onValueChange();
|
||||
TextValueViewer::onAction(action, undone);
|
||||
findWordLists();
|
||||
TYPE_CASE(action, TextValueAction) {
|
||||
selection_start = action.selection_start;
|
||||
@@ -1001,7 +1001,7 @@ void TextValueEditor::determineSize(bool force_fit) {
|
||||
(int)pos.y - 1,
|
||||
(int)sbw,
|
||||
(int)rot.trY(style().height) + 2);
|
||||
v.reset();
|
||||
v.reset(true);
|
||||
} else {
|
||||
// Height depends on font
|
||||
wxMemoryDC dc;
|
||||
|
||||
Reference in New Issue
Block a user