Author Topic: Print error  (Read 9055 times)

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Print error
« on: January 11, 2017, 02:42:36 pm »
with svn10922, Vista pro pack2.

In a simple pane of the editor, a text selected in a file prints correctly.
With the same split pane, the same text selected, the whole file is printed, not the selection.
Do you have the same behavior ?
Thanks in advance.
« Last Edit: April 05, 2022, 04:03:15 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Print error
« Reply #1 on: January 12, 2017, 01:01:39 am »
Is this a regression in this revision?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Print error
« Reply #2 on: January 12, 2017, 11:31:23 am »
I do not know. That's why I'm asking if this happens with other users.
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Print error
« Reply #3 on: January 14, 2017, 01:39:23 pm »
Can you try 16.01 or 13.12 or some older night build?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Print error
« Reply #4 on: January 14, 2017, 05:47:12 pm »
yes :
16.01, svn1816, svn1856 are good
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Print error
« Reply #5 on: January 14, 2017, 07:10:23 pm »
Do you mean that all versions you've mentioned in the previous post (16.01, 1816 and 1856) are working correctly and only 19022 is broken?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Print error
« Reply #6 on: January 15, 2017, 12:58:04 am »
yes,
I only have these versions available :
16.01, svn1816, svn1856 are good
10922 it's broken
« Last Edit: April 05, 2022, 04:03:45 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Print error
« Reply #8 on: January 15, 2017, 06:01:13 pm »
10868 it's broken.

10816, 10856, 10868 :
The upper pane prints the selected text.
The lower pane prints the entire file !!

10922 :
Two panes (upper and lower) prints the entire file !!
« Last Edit: April 05, 2022, 04:04:09 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Print error
« Reply #9 on: January 15, 2017, 11:26:32 pm »
I'm confused why are you saying that 10868 is broken but list it with the others 10816 and 10856 where I suppose the behaviour is correct? If the first depicted behaviour correct?

Can you test 10912 (or the nightly before 10922) and tell us if it works?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Print error
« Reply #10 on: January 16, 2017, 12:06:55 pm »
I decided to repeat the tests systematically on the two panels displaying the same file.

These are the only versions I can still use (Vista Business Pack 2,  TDM-GCC 4.7.1, wxWidgets unicode 2.8.12):

16.01, 10118, 10127, 10816, 10856, 10868, 10912, 10922 :
The upper pane prints the selected text.
The lower pane prints the entire file !!

I will try to search in the source, but I do not know where to look?
Do you know which functions handle printing?

« Last Edit: April 05, 2022, 04:04:38 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Print error
« Reply #11 on: January 16, 2017, 05:30:02 pm »
I decided to repeat the tests systematically on the two panels displaying the same file.

These are the only versions I can still use (Vista Business Pack 2,  TDM-GCC 4.7.1, wxWidgets unicode 2.8.12):

16.01, 10118, 10127, 10816, 10856, 10868, 10912, 19022 :
The upper pane prints the selected text.
The lower pane prints the entire file !!

I will try to search in the source, but I do not know where to look?
Do you know which functions handle printing?
One issue is definitely, that the print-function always uses the first control, not the last active one.
Can you test the attached patch ?

Offline LETARTARE

  • Lives here!
  • ****
  • Posts: 531
  • L'ami de l'homme.The friend of man.
    • LETARTARE
Re: Print error
« Reply #12 on: January 16, 2017, 07:10:57 pm »
Hello,
thanks for patch, good catch.
Of course, the value of pane 1 (m_pControl) was overwritten with the value of pane 2 in cbEditor::Print(bool selectionOnly, PrintColourMode pcm, bool line_numbers) !!

I only tested it on svn10922 : it's good.

Happy New Year.
« Last Edit: April 05, 2022, 04:05:03 pm by LETARTARE »
CB-13483, plugins-sdk-2.25.0 : Collector-2.0.0, AddOnForQt-3.9.1
1-Win7 Business Pack1 64bits : wx-3.2.4, gcc-8.1.0,
2-OpenSuse::Leap-15.4-64bits : wx-3.2.4;gtk3, gcc-8.2.1,
=> !! The messages are translated by Deepl

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Print error
« Reply #13 on: January 16, 2017, 07:31:16 pm »
Hello,
thanks for patch, good catch.
Of course, the value of pane 1 (m_pControl) was overwritten with the value of pane 2 in cbEditor::Print(bool selectionOnly, PrintColourMode pcm, bool line_numbers) !!

I only tested it on svn19022 : it's good.
Do I understand it correctly, that the issues are gone with the patch ?
If yes and there are no objections from other devs, I can commit it.

Happy New Year.
Many thanks, the same to you !

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Print error
« Reply #14 on: January 16, 2017, 09:16:55 pm »
If yes and there are no objections from other devs, I can commit it.
Looks fine to me.

Jens are you able to print on linux?
My printing broke for some reason and there was another printing problem I'm no long able to look at. :(
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]