Author Topic: Print error  (Read 2023 times)

Offline LETARTARE

  • Regular
  • ***
  • Posts: 329
  • L'ami de l'homme.The friend of man.
Print error
« on: January 11, 2017, 02:42:36 pm »
with svn19022, 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.
Vista Business Pack 2,  TDM-GCC 4.7.1
C::B svn11112, C::B 16.01 release (wxWidgets unicode 2.8.12) and wxTranslatepluginForCB, with plugin 'QtPregenForCB'
=> The messages are translated by GOOGLE !! <=

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10194
Re: Print error
« Reply #1 on: January 12, 2017, 01:01:39 am »
Is this a regression in this revision?
<debugger plugin maintainer>
(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

  • Regular
  • ***
  • Posts: 329
  • L'ami de l'homme.The friend of man.
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.
Vista Business Pack 2,  TDM-GCC 4.7.1
C::B svn11112, C::B 16.01 release (wxWidgets unicode 2.8.12) and wxTranslatepluginForCB, with plugin 'QtPregenForCB'
=> The messages are translated by GOOGLE !! <=

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10194
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?
<debugger plugin maintainer>
(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

  • Regular
  • ***
  • Posts: 329
  • L'ami de l'homme.The friend of man.
Re: Print error
« Reply #4 on: January 14, 2017, 05:47:12 pm »
yes :
16.01, svn1816, svn1856 are good
Vista Business Pack 2,  TDM-GCC 4.7.1
C::B svn11112, C::B 16.01 release (wxWidgets unicode 2.8.12) and wxTranslatepluginForCB, with plugin 'QtPregenForCB'
=> The messages are translated by GOOGLE !! <=

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10194
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?
<debugger plugin maintainer>
(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

  • Regular
  • ***
  • Posts: 329
  • L'ami de l'homme.The friend of man.
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
19022 it's broken
Vista Business Pack 2,  TDM-GCC 4.7.1
C::B svn11112, C::B 16.01 release (wxWidgets unicode 2.8.12) and wxTranslatepluginForCB, with plugin 'QtPregenForCB'
=> The messages are translated by GOOGLE !! <=

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10194
<debugger plugin maintainer>
(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

  • Regular
  • ***
  • Posts: 329
  • L'ami de l'homme.The friend of man.
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 !!

19022 :
Two panes (upper and lower) prints the entire file !!
Vista Business Pack 2,  TDM-GCC 4.7.1
C::B svn11112, C::B 16.01 release (wxWidgets unicode 2.8.12) and wxTranslatepluginForCB, with plugin 'QtPregenForCB'
=> The messages are translated by GOOGLE !! <=

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10194
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?
<debugger plugin maintainer>
(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

  • Regular
  • ***
  • Posts: 329
  • L'ami de l'homme.The friend of man.
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, 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?

« Last Edit: January 16, 2017, 12:19:00 pm by LETARTARE »
Vista Business Pack 2,  TDM-GCC 4.7.1
C::B svn11112, C::B 16.01 release (wxWidgets unicode 2.8.12) and wxTranslatepluginForCB, with plugin 'QtPregenForCB'
=> The messages are translated by GOOGLE !! <=

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7200
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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

  • Regular
  • ***
  • Posts: 329
  • L'ami de l'homme.The friend of man.
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 svn19022 : it's good.

Happy New Year.
Vista Business Pack 2,  TDM-GCC 4.7.1
C::B svn11112, C::B 16.01 release (wxWidgets unicode 2.8.12) and wxTranslatepluginForCB, with plugin 'QtPregenForCB'
=> The messages are translated by GOOGLE !! <=

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7200
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
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: 10194
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. :(
<debugger plugin maintainer>
(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!]