"insert parameter" and "user parameter" buttons now work.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@271 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-04-21 01:10:32 +00:00
parent fef99c78e3
commit 5327520646
10 changed files with 102 additions and 42 deletions
+5 -2
View File
@@ -218,8 +218,8 @@ void TextValueEditor::onLoseFocus() {
assert(caret);
if (caret->IsVisible()) caret->Hide();
// hide selection
selection_start = selection_end = 0;
selection_start_i = selection_end_i = 0;
//selection_start = selection_end = 0;
//selection_start_i = selection_end_i = 0;
}
bool TextValueEditor::onContextMenu(IconMenu& m, wxContextMenuEvent& ev) {
@@ -478,6 +478,9 @@ void TextValueEditor::showCaret() {
if (!caret->IsVisible()) caret->Show();
}
void TextValueEditor::insert(const String& text, const String& action_name) {
replaceSelection(text, action_name);
}
void TextValueEditor::replaceSelection(const String& replacement, const String& name) {
if (replacement.empty() && selection_start == selection_end) {
// no text selected, nothing to delete