Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-5665

Global Find and Replace Fails in Script Editor

    Details

      Description

      If you enter the script below in the script edit, bring up the Find\Replace menu, and Replace ALL "Hat" with "HAT", only the first instance is replaced.

      Create Variable P_Hat P_HAT

      P_Hat = 12
      P_HAT = 16
      BeginMissionSequence

      P_Hat = 12
      P_HAT = 16

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            tgrubb Thomas Grubb added a comment -

            I have the fix; in ScriptEditor.cpp replace the OnReplaceAll method:

            void ScriptEditor::OnReplaceAll(wxCommandEvent &event)
            {
            GotoPos(0);
            OnFindNext(event);
            while (mFindText.IsSameAs(GetSelectedText(), false))

            { ReplaceSelection(mReplaceText); OnFindNext(event); }

            }

            Unfortunately, because my system is so FUBAR I cannot check in the fix. I will do this when I get the new system.

            Show
            tgrubb Thomas Grubb added a comment - I have the fix; in ScriptEditor.cpp replace the OnReplaceAll method: void ScriptEditor::OnReplaceAll(wxCommandEvent &event) { GotoPos(0); OnFindNext(event); while (mFindText.IsSameAs(GetSelectedText(), false)) { ReplaceSelection(mReplaceText); OnFindNext(event); } } Unfortunately, because my system is so FUBAR I cannot check in the fix. I will do this when I get the new system.
            Hide
            tgrubb Thomas Grubb added a comment -

            Should be in 2016-08-02 build

            Show
            tgrubb Thomas Grubb added a comment - Should be in 2016-08-02 build
            Hide
            shughes Steven Hughes added a comment -

            Verified fixed in Aug. 11 build

            Show
            shughes Steven Hughes added a comment - Verified fixed in Aug. 11 build

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: