View Issue Details

IDProjectCategoryView StatusLast Update
0020209LazarusOtherpublic2012-02-18 21:50
ReporterFlávio Etrusco (notifications not working)Assigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0020209: TSynEdit.SetCaretX and TSynEdit.SetCaretY don't call FCaret.ChangeOnTouch
DescriptionSetCaretXY calls FCaret.ChangeOnTouch, but SetCaretX and SetCaretY don't. Why?
Also, SetCaretXY is virtual, but other aren't. They either should also be virtual or just invoke SetCaretXY.

Related RFE: make SetCaretAndSelection public :)
TagsNo tags attached.
Fixed in Revision
LazTarget1.0
Widgetset
Attached Files

Activities

Martin Friebe

2011-11-04 02:23

manager   ~0053793

Last edited: 2011-11-04 02:55

ok, this a 3 reports in one, might need to split them out.

1) virtual SetCaretXY
I see no reason why it should be virtual. So it might just be removed? there appear to be various other methods that are virtual for no good reason.

2)
make SetCaretAndSelection public.
this will require a wrapper. SetCaretAndSelection takes a mix of physical and logical coordinates. This should not be exposed
Imagine giving the same coordinates for caret and selection-start, and they end up on different places. Which means it requires an alternative name.

3)
why should they have ChangeOnTouch?
This is for 0014213 It is required if SynEdit.ExecuteCommand calls SetCaretXY.
there are no relevant calls to just CartetX or Y
In fact, it probably should not be in SetCaretXy either. But I need to review this further.

Edit: the question is, if SetCaretXY from user code should clear the current selection, even if the caret is set to one of the selection ends?

1) You modularized SynEdit a lot. The original code simply used virtual methods to allow cusotmizing the behavior.

2) Does it? I'll take a look. In upstream synedit all the 3 arguments were in physical coordinates.

3) IIRC I didn't look into ChangeOnTouch implementation, I just meant SetCaretXY/X/Y should be completely "orthogonal".

4) I guess this is the expected behavior.

Martin Friebe

2012-02-18 21:50

manager   ~0056917

Changed. Now all 3 use ChangeOnTouch. This means all 3 clear the selection, on any write-access, even if the current value is written.
This is what SetCaretXY already did (the other 2 now follow)


Removed "virtual". Due to the ability to bypass via the other two, it was not useful anyway.

Making the individual (X or Y) setters call the combined XY setter is not possible, as SetCaretY leaves the X value in tact (Option eoKeepCaretX).


---
About:
SetCaretAndSelection this is a different issue, but before requesting please discuss the possibilities (mail-list / forum)

Issue History

Date Modified Username Field Change
2011-09-10 16:53 Flávio Etrusco (notifications not working) New Issue
2011-09-10 16:53 Flávio Etrusco (notifications not working) LazTarget => -
2011-09-10 17:03 Martin Friebe Status new => assigned
2011-09-10 17:03 Martin Friebe Assigned To => Martin Friebe
2011-11-04 02:23 Martin Friebe Note Added: 0053793
2011-11-04 02:23 Martin Friebe Status assigned => feedback
2011-11-04 02:54 Martin Friebe Note Edited: 0053793
2011-11-04 02:55 Martin Friebe Note Edited: 0053793
2011-11-04 02:55 Martin Friebe Note Edited: 0053793
2011-11-04 13:49 Flávio Etrusco (notifications not working) Note Added: 0053800
2012-02-18 21:50 Martin Friebe LazTarget - => 1.0
2012-02-18 21:50 Martin Friebe Status feedback => resolved
2012-02-18 21:50 Martin Friebe Fixed in Version => 0.9.31 (SVN)
2012-02-18 21:50 Martin Friebe Resolution open => fixed
2012-02-18 21:50 Martin Friebe Note Added: 0056917
2012-02-18 21:50 Martin Friebe Target Version => 0.99.0