Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Replace bug fix

<< < (3/3)

oBFusCATed:
There you go...

--- Code: ---Index: src/sdk/findreplacedlg.cpp
===================================================================
--- src/sdk/findreplacedlg.cpp
+++ src/sdk/findreplacedlg.cpp
@@ -229,6 +229,7 @@ FindReplaceDlg::FindReplaceDlg(wxWindow* parent, const wxString& initial, bool h
         XRCCTRL(*this, "chkDelOldSearchRes2",    wxCheckBox)->Show();
     }

+    wxComboBox *findCombo = nullptr;
     m_findPage = 0;
     if (findReplaceInFilesOnly)
     {
@@ -236,16 +237,22 @@ FindReplaceDlg::FindReplaceDlg(wxWindow* parent, const wxString& initial, bool h
         XRCCTRL(*this,  "nbReplace", wxNotebook)->SetSelection(1);
         m_findPage = (XRCCTRL(*this, "nbReplace", wxNotebook)->GetPage(0)); // no active editor, so only replace-in-files
         (XRCCTRL(*this, "nbReplace", wxNotebook)->RemovePage(0)); // no active editor, so only replace-in-files
-        XRCCTRL(*this,  "cmbFind2",  wxComboBox)->SetFocus();
+        findCombo = XRCCTRL(*this,  "cmbFind2",  wxComboBox);
         m_findReplaceInFilesActive = true;
     }
     else if (m_findReplaceInFilesActive)
     {
         XRCCTRL(*this, "nbReplace", wxNotebook)->SetSelection(1); // Search->Replace in Files was selected
-        XRCCTRL(*this, "cmbFind2",  wxComboBox)->SetFocus();
+        findCombo = XRCCTRL(*this, "cmbFind2",  wxComboBox);
     }
     else
-        XRCCTRL(*this, "cmbFind1",  wxComboBox)->SetFocus();
+        findCombo = XRCCTRL(*this, "cmbFind1",  wxComboBox);
+
+    if (findCombo)
+    {
+        findCombo->SetFocus();
+//        findCombo->SetSelection(0, findCombo->GetValue().length());
+    }

     GetSizer()->SetSizeHints(this);

--- End code ---

p.s. now you know how I feel, when I see commits full of style-changes and you start to advertise your tool and workflow ::) :P

MortenMacFly:
OK - this one applied.


--- Quote from: oBFusCATed on June 22, 2013, 09:29:39 pm ---p.s. now you know how I feel, when I see commits full of style-changes and you start to advertise your tool and workflow ::) :P

--- End quote ---
I don't know exactly what you mean, but I still believe you'll definitely reach more devs and potentially interested people with a SVN patch. So its up to you in the end what you want to achieve... I don't mind if you post GIT patches at all, I just won't invest much time to hack a patch so it works for me (and only me). Would you hack SVN patches so they work on GIT? I doubt. ;D

oBFusCATed:

--- Quote from: MortenMacFly on June 23, 2013, 07:57:16 pm ---OK - this one applied.

--- End quote ---
The idea is not to apply it, but to play with the options and then tell me which are working and which doesn't.


--- Quote from: MortenMacFly on June 23, 2013, 07:57:16 pm ---I don't know exactly what you mean ...

--- End quote ---
I mean that every time I mention that it is a bad practice to combine real changes with white-space/style changes you mention that I have to use your super-dupper-paid SmartXXX software. So you apply double standard here :P  ;D
Git has no problems with svn patches, because I don't use git to apply them, but the patch utility. The workflow is the same for both git and svn here...

btw: I though you've reported the issue to the SmartXXX guys and they've fixed it?

Navigation

[0] Message Index

[*] Previous page

Go to full version