[mapguide-commits] r6754 - in trunk/Tools/Maestro/Maestro.Editors/Generic: . XmlEditor
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Jun 12 03:04:46 PDT 2012
Author: jng
Date: 2012-06-12 03:04:45 -0700 (Tue, 12 Jun 2012)
New Revision: 6754
Modified:
trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/FindAndReplaceForm.cs
trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditorCtrl.cs
Log:
Fix search and replace contextual command due to ICSharpCode.TextEditor integration
Modified: trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/FindAndReplaceForm.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/FindAndReplaceForm.cs 2012-06-12 04:29:51 UTC (rev 6753)
+++ trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/FindAndReplaceForm.cs 2012-06-12 10:04:45 UTC (rev 6754)
@@ -64,9 +64,9 @@
this.Text = text;
}
- public void ShowFor(TextEditorControl editor, bool replaceMode)
- {
- Editor = editor;
+ internal void ShowFor(TextEditorControl editor, bool replaceMode, bool show)
+ {
+ Editor = editor;
_search.ClearScanRegion();
var sm = editor.ActiveTextAreaControl.SelectionManager;
@@ -86,11 +86,19 @@
ReplaceMode = replaceMode;
- this.Owner = (Form)editor.TopLevelControl;
- this.Show();
+ if (show)
+ {
+ this.Owner = (Form)editor.TopLevelControl;
+ this.Show();
- txtLookFor.SelectAll();
- txtLookFor.Focus();
+ txtLookFor.SelectAll();
+ txtLookFor.Focus();
+ }
+ }
+
+ public void ShowFor(TextEditorControl editor, bool replaceMode)
+ {
+ ShowFor(editor, replaceMode, true);
}
public bool ReplaceMode
Modified: trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditorCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditorCtrl.cs 2012-06-12 04:29:51 UTC (rev 6753)
+++ trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditorCtrl.cs 2012-06-12 10:04:45 UTC (rev 6754)
@@ -320,6 +320,7 @@
public void FindAndReplace(string find, string replace)
{
+ _findForm.ShowFor(txtXmlContent, true, false); //This is just to initialize it just in case
_findForm.FindAndReplace(find, replace);
}
}
More information about the mapguide-commits
mailing list