Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Multi File editing
MortenMacFly:
Mmmmh... one thing I have noticed:
If I search in files and click on the list of search results the file is opened, the line is focussed but not highlighted anymore. That's quite annoying as you don't really see where you are... there is even no cursor.
Can somebody confirm this? (I am not sure whether it's related to this patch...)
Der Meister:
It works for me as soon as the editor gets the keyboard focus. I guess this should automatically happen by the following lines in editormanager (function SetActiveEditor):
--- Code: --- if (ed->IsBuiltinEditor())
static_cast<cbEditor*>(ed)->GetControl()->SetFocus();
--- End code ---
Therefore either cbEditor::m_IsBuiltinEditor isn't set to true or cbStyledTextCtrl::SetFocus doesn't work (anymore).
Edit: cbEditor::m_IsBuiltinEditor seems to be true. I don't think that wxPanel::SetFocus has a bug. The issue here on my system os probably related to my window-manager. It is configured in the way that the window below the mouse cursor gets the keyboard focus which isn't the editor in this case. Therefore I guess everything is working fine here for me. It could still be an issue with the patch I posted on berlios because my local working copy already has a lot more modifications (no more wxFlatNotebook for example).
MortenMacFly:
--- Quote from: Der Meister on June 18, 2008, 03:09:26 pm ---
--- Code: --- if (ed->IsBuiltinEditor())
static_cast<cbEditor*>(ed)->GetControl()->SetFocus();
--- End code ---
--- End quote ---
This seems in fact to work... but different now. I realised the following:
If you click on a search result you are taken to the right tab (editor) in the view(s). This tab also gets active - so this seems to work. If you press the TAB key now (on Windows) the content of the editor becomes active and the line is highlighted correctly (and the cursor appears). It seems as if the editors tab (where the file name stands) gets activated first. Very, very strange...
At least it gives a clue and is really caused by the patch...
--- Quote from: Der Meister on June 18, 2008, 03:09:26 pm ---my local working copy already has a lot more modifications (no more wxFlatNotebook for example).
--- End quote ---
Oh dear... that *really* sounds great... Time to open a SVN branch then... ;-)
MortenMacFly:
--- Quote from: MortenMacFly on June 18, 2008, 05:08:08 pm ---Very, very strange...
--- End quote ---
OK - I found a way to "reproduce" (it's very simple):
- Have an editor opened and an active line in the editor (visible cursor).
- Now just switch to another application (using ALT+TAB) and then back to C::B.
In my case the editors tab is now selected , the actual editor's content (source code) is not and therefore no line highlighted, no cursor etc... Is this the usual behaviour of a wxAuiNotebook?
Anyone using this patch on Windows/Linux, please tell me: What happens to you?
Der Meister:
Before I put more effort into this I would like to ask the devs a question: Is this patch desired and will it be applied somewhere in the future? I know it won't be applied immediately because this patch implies big changes (MortenMacFly already named the issues) but I don't want to sacrifice a lot of work for it if no one is willing to apply it to the main codeline.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version