Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
MiniDoc
Jenna:
I just send you a pull request with my solution for the resize-stuff.
My fork was created short before your resize-commit.
It goes a slightly different way, because I connect to the first cbStyledTextCtrl instead of the editor.
So resize-events in split-view are recognized also.
Because of your last commit, the pull-request can not be merged directly (merge-conflicts).
MortenMacFly:
Another nice example that git is not always helpful... :-)
Jenna:
--- Quote from: MortenMacFly on August 12, 2014, 11:09:19 pm ---Another nice example that git is not always helpful... :-)
--- End quote ---
That has nothing to do with git, but with two developers working on the same problem ath the same time.
With svn you can not even create a pull-request.
oBFusCATed:
--- Quote from: danselmi on August 12, 2014, 07:25:47 pm ---Can you explain how to reproduce?
--- End quote ---
See default colors of the c++ theme to dark gray and light gray. Then try to open the MiniDoc panel. If it still works correctly then I can share my theme...
danselmi:
--- Quote from: jens on August 12, 2014, 11:07:09 pm ---...
It goes a slightly different way, because I connect to the first cbStyledTextCtrl instead of the editor.
So resize-events in split-view are recognized also.
--- End quote ---
Applied your patch, thanks a lot. It is not working when the second splited view changes size (hide/show logs resizes only second view).
--- Quote from: jens on August 12, 2014, 08:09:02 pm ---... for splitted editors ... is more broken (at least here): the actual highlighted lines (grey rectangle) get a white circle in the editors margin of the second control.
--- End quote ---
Its because the marker MiniStyledTextCtrl::GetOurMarkerNumber() is not defined as wxSCI_MARK_EMPTY. And other unused marker numbers have other visible marker settings.
A simple solution is to define all markers (0..wxSCI_MARKER_MAX] as wxSCI_MARKER_EMPTY after creation of cbStyledTextCtrl (in cbEditor). like this:
--- Code: ---Index: cbeditor.cpp
===================================================================
--- cbeditor.cpp (revision 9855)
+++ cbeditor.cpp (working copy)
@@ -782,6 +782,7 @@
m_pControl->SetMarginMask(C_MARKER_MARGIN, 0);
m_pControl->SetMarginMask(C_CHANGEBAR_MARGIN, 0);
m_pControl->SetMarginMask(C_FOLDING_MARGIN, 0);
+ InitMarker(m_pControl);
SetEditorStyleBeforeFileOpen();
m_IsOK = Open();
@@ -797,6 +798,13 @@
}
ConnectEvents(m_pControl);
}
+void cbEditor::InitMarker(cbStyledTextCtrl* control)
+{
+ if(!control)
+ return;
+ for (int marker = 0 ; marker <= wxSCI_MARKER_MAX ; ++marker)
+ control->MarkerDefine(marker, wxSCI_MARK_EMPTY);
+}
void cbEditor::NotifyPlugins(wxEventType type, int intArg, const wxString& strArg, int xArg, int yArg)
{
@@ -1095,6 +1103,7 @@
// create the right control
m_pControl2 = CreateEditor();
+ InitMarker(m_pControl2);
// update controls' look'n'feel
// do it here (before) document is attached, speeds up syntaxhighlighting
--- End code ---
I tried to define the marker from the MiniDoc plugin, but there I don't know when a splitted view gets created. Right?
regards
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version