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

Anyone else getting selection artifacts when mouse selecting with left button?

<< < (2/2)

Robert Eastwood:

--- Quote from: oBFusCATed on June 26, 2019, 08:42:56 am ---17.12 is never tested with wx 3.1.2. Please test lastest master/trunk. Also trunk/master is using newer version of Scintilla (our editor component). There is not point playing/modifying the old version.

--- End quote ---

The function I mentioned changes for is still the same(although there were many changes elsewhere in the file),It should be noted how auto scroll while selecting is done can be added in, since old method still in use.  change in this thread is better since currently the function skips allowing the mouse to change selection half the time, making selection lag one mouse message behind often, and possibly missing a mouse move that is important.

I noticed many changes, and will test that file, it is possible someone found the error of invalidation for drawing somewhere else(since it was an invalidation error), however since the primary function called when selecting with mouse is still the same, I expect same results, but will look at it after building the 18.xx version, presuming that is the most current trunk.


Also could you tell me if the Scintilla.iface auto generation of wxScintilla is still the method used, and what app would generate the wxScinilla.h (2 files) needed from that file.  If I make changes that include adding messages to that file, I would like it to follow the current method used.   If you still use the Scintilla.iface could you quickly explain the generation method of files method.  If the Scintilla is simply copied by a bat to make sure values are the same for multiple compilation units that is a different method of updating.

oBFusCATed:

--- Quote from: oBFusCATed on June 26, 2019, 08:42:56 am ---
--- Quote from: Robert Eastwood on June 26, 2019, 04:50:17 am ---I can send a screen capture if you are interested in seeing the effect.

--- End quote ---

Yes, do so, please.

--- End quote ---

I'm ignoring your posts until you post a video of the problem...
Sorry, I'm too busy to read so much text.

Robert Eastwood:


--- Quote from: oBFusCATed on June 27, 2019, 08:56:01 am ---I'm ignoring your posts until you post a video of the problem...
Sorry, I'm too busy to read so much text.

--- End quote ---
On the topic of Busy I added a deque FIFO buffer to cbEditor.

void cbEditor::OnScintillaEvent(wxScintillaEvent& event)
currently ignores events while loading or unloading projects.  Currently the events are simply lost during any state where ProjectManager::IsBusy()

Those events could be important so I added an event buffer so the events are not lost and are sent in the proper sequence after the busy state completes.

added to
void cbEditor::OnScintillaEvent(wxScintillaEvent& event)

--- Code: --- //on busy loses events! when ProjectManager is busy (is loading a project or workspace, or unloading a project or workspace).
        //This could create illogical sequencing.
//This code adds storing of events to be resent next time this function is called to send an event
       //and project manager is not busy, while maintaining event order.
if(EditorHooks::HasRegisteredHooks())
{
if(ProjectManager::IsBusy())
{
//events can't be sent, and we can't wait so buffer it
wxScintillaEvent* pevent = static_cast<wxScintillaEvent*>(event.Clone());
m_bufferedEvents.push_back(pevent);
}
else
{
//add busy check again in case one of the event is actually to load or unload a project
while(!m_bufferedEvents.empty() && !ProjectManager::IsBusy())
{
wxScintillaEvent* pEvent = m_bufferedEvents.front();
        m_bufferedEvents.pop_front();
        if(pEvent){
                    EditorHooks::CallHooks(this, *pEvent);//no recursion to not store events on stack
                    delete pEvent;
}

if(m_bufferedEvents.empty())//finished stored items
{
if(ProjectManager::IsBusy())
{
//another buffering because of busy again. could be recursive
wxScintillaEvent* peventnew = dynamic_cast<wxScintillaEvent*>(event.Clone());
m_bufferedEvents.push_back(peventnew);
}else
{
EditorHooks::CallHooks(this, event);
return;
}
}
}
}
}


--- End code ---
in .h file
#include <deque>
std::deque<wxScintillaEvent*> m_bufferedEvents;

On the topic of your comment

--- Quote from: oBFusCATed on June 27, 2019, 08:56:01 am ---I'm ignoring your posts until you post a video of the problem...
Sorry, I'm too busy to read so much text.

--- End quote ---
My post was intended to assist if you experience same issue, you ignoring this thread is fine with me.
if you do not want that assistance that is fine,

other people that build who may have seen the problem can choose to read and implement any changes that help them.

Your comment about wanting a video is a claim that you do not believe my comment. or that a video would be easier to understand
I have no reason to lie, nor to convince you,
although I may post a video next time I do a build without the various code changes that correct the issue.
possibly during looking at the newer code from 18xx trunk

Robert Eastwood:
Using snapshot of trunk to build based on latest code changes labeled as 11751  64bit build, mingw64 8.1, windows 10, wxWidgets 3.1.2 (with dx2d in wxWidgets build flag wxUSE_GRAPHICS_DIRECT2D set to 1 as is indicated as required)

The selection error does not occur.
Thanks for letting me know that using the latest version is far better then using the last official release 17.12 on codeblocks download page.

However the comment on changing the method of autoscrolling, to slow it down without slowing own selection while dragging mouse is still valid.

BlueHazzard:

--- Quote ---Thanks for letting me know that using the latest version is far better then using the last official release 17.12 on codeblocks download page.
--- End quote ---
The trunk is 90% of the time the best version of cb we have... The least bugs and the most features. So if you build codeblocks by yourself you can mostly use the trunk version...

Navigation

[0] Message Index

[*] Previous page

Go to full version