mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
"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:
@@ -161,6 +161,10 @@ void DataEditor::onCommand(int id) {
|
||||
}
|
||||
}
|
||||
|
||||
void DataEditor::insert(const String& text, const String& action_name) {
|
||||
if (current_editor) current_editor->insert(text, action_name);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : Mouse events
|
||||
|
||||
void DataEditor::onLeftDown(wxMouseEvent& ev) {
|
||||
|
||||
@@ -70,6 +70,11 @@ class DataEditor : public CardViewer {
|
||||
*/
|
||||
bool search(FindInfo& find, bool from_start);
|
||||
|
||||
// --------------------------------------------------- : Selection in editor
|
||||
|
||||
/// Insert 'text' into the current editor, using an action with the given name
|
||||
void insert(const String& text, const String& action_name);
|
||||
|
||||
// --------------------------------------------------- : ValueViewers
|
||||
|
||||
protected:
|
||||
|
||||
@@ -91,6 +91,9 @@ void TextCtrl::onChangeSet() {
|
||||
} else {
|
||||
setValue(nullptr);
|
||||
}
|
||||
// select the one and only editor
|
||||
current_viewer = viewers.front().get();
|
||||
current_editor = current_viewer->getEditor();
|
||||
}
|
||||
|
||||
void TextCtrl::onInit() {
|
||||
|
||||
Reference in New Issue
Block a user