Thread: Copy and paste in Edit Data
Hi Sorry if this has been raised before, but it's been a nuisance to me for quite a while and I thought I should mention it. To reproduce the problem :- 1. Open the Edit Data window on a table 2. Click into a text field containing some text and highlight a single word 3. Paste what you have just copied. You will get the whole contents of the field not what you just highlighted. My environment is Windows Vista pgAdmin 1.16.1 Many thanks, and it goes without saying thanks for a great tool! Kieran
I am running 1.16.1 (Windows 7). I can reproduce this. It makes a difference, though, if you use ctrl-c vs the right-click/Copy.ctrl-c does the whole entry, right-click/Copy gets just what is highlighted. ctrl-c gets the whole entryeven if nothing is highlighted.<br /><br /><br /><div class="gmail_quote">On Fri, May 17, 2013 at 5:34 AM, Kieran <spandir="ltr"><<a href="mailto:kieran.mccusker@kwest.co" target="_blank">kieran.mccusker@kwest.co</a>></span> wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi<br /><br/> Sorry if this has been raised before, but it's been a nuisance to me for<br /> quite a while and I thought I shouldmention it.<br /><br /> To reproduce the problem :-<br /><br /> 1. Open the Edit Data window on a table<br /> 2. Clickinto a text field containing some text and highlight a single word<br /> 3. Paste what you have just copied.<br /><br/> You will get the whole contents of the field not what you just highlighted.<br /><br /> My environment is<br /> WindowsVista<br /> pgAdmin 1.16.1<br /><br /> Many thanks, and it goes without saying thanks for a great tool!<br /><spanclass="HOEnZb"><font color="#888888"><br /> Kieran<br /><br /><br /><br /><br /><br /> --<br /> Sent via pgadmin-supportmailing list (<a href="mailto:pgadmin-support@postgresql.org">pgadmin-support@postgresql.org</a>)<br /> Tomake changes to your subscription:<br /><a href="http://www.postgresql.org/mailpref/pgadmin-support" target="_blank">http://www.postgresql.org/mailpref/pgadmin-support</a><br/></font></span></blockquote></div><br />
On Friday, May 17, 2013, Michael Shapiro wrote:
I am running 1.16.1 (Windows 7). I can reproduce this. It makes a difference, though, if you use ctrl-c vs the right-click/Copy. ctrl-c does the whole entry, right-click/Copy gets just what is highlighted. ctrl-c gets the whole entry even if nothing is highlighted.On Fri, May 17, 2013 at 5:34 AM, Kieran <kieran.mccusker@kwest.co> wrote:Hi
Sorry if this has been raised before, but it's been a nuisance to me for
quite a while and I thought I should mention it.
To reproduce the problem :-
1. Open the Edit Data window on a table
2. Click into a text field containing some text and highlight a single word
3. Paste what you have just copied.
You will get the whole contents of the field not what you just highlighted.
My environment is
Windows Vista
pgAdmin 1.16.1
I believe the attached patch fixes this. With it, if you're in Edit Mode in a cell, then Copy works more like it would in a regular text box - only the highlighted text is copied, and there are no quotes etc. added. In View Mode, whatever cells are selected will be copied, and quoting/delimiting applied.
Can someone review it please (Dhiraj :-p )?
Thanks.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment
Hi Dave,
I had some problems with the applying the patch because it seems corrupted with characters ^[[m at the beginning and end or lines of the patch code. Once I removed them the patch applied properly.
The patch is working as expected and I have tested in all scenarios that I could think of. While reviewing I have only one doubt:
Should'nt we remove the definition and declaration of the OnCopy() function from ctlSQLGrid [ void ctlSQLGrid::OnCopy(wxCommandEvent &ev) ] as it is no longer being called, owning to the removal of the event trigger in the patch?
- EVT_MENU(MNU_COPY, ctlSQLGrid::OnCopy)
Apart from this the code looks good to me.
Thanks,
On Tue, May 21, 2013 at 4:26 AM, Dave Page <dpage@pgadmin.org> wrote:
On Friday, May 17, 2013, Michael Shapiro wrote:I am running 1.16.1 (Windows 7). I can reproduce this. It makes a difference, though, if you use ctrl-c vs the right-click/Copy. ctrl-c does the whole entry, right-click/Copy gets just what is highlighted. ctrl-c gets the whole entry even if nothing is highlighted.On Fri, May 17, 2013 at 5:34 AM, Kieran <kieran.mccusker@kwest.co> wrote:Hi
Sorry if this has been raised before, but it's been a nuisance to me for
quite a while and I thought I should mention it.
To reproduce the problem :-
1. Open the Edit Data window on a table
2. Click into a text field containing some text and highlight a single word
3. Paste what you have just copied.
You will get the whole contents of the field not what you just highlighted.
My environment is
Windows Vista
pgAdmin 1.16.1I believe the attached patch fixes this. With it, if you're in Edit Mode in a cell, then Copy works more like it would in a regular text box - only the highlighted text is copied, and there are no quotes etc. added. In View Mode, whatever cells are selected will be copied, and quoting/delimiting applied.Can someone review it please (Dhiraj :-p )?Thanks.
--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
regards,
Dhiraj Chawla
Software Engineer
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Phone: +91-20-30589522
Software Engineer
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Phone: +91-20-30589522
Hi On Tue, May 21, 2013 at 11:14 AM, Dhiraj Chawla <dhiraj.chawla@enterprisedb.com> wrote: > Hi Dave, > > I had some problems with the applying the patch because it seems corrupted > with characters ^[[m at the beginning and end or lines of the patch code. > Once I removed them the patch applied properly. Hmm, must have been where I was working on Windows. > The patch is working as expected and I have tested in all scenarios that I > could think of. While reviewing I have only one doubt: Cool. > Should'nt we remove the definition and declaration of the OnCopy() function > from ctlSQLGrid [ void ctlSQLGrid::OnCopy(wxCommandEvent &ev) ] as it is no > longer being called, owning to the removal of the event trigger in the > patch? > > - EVT_MENU(MNU_COPY, ctlSQLGrid::OnCopy) No, because ctlSQLGrid::OnCopy is still called by frmQuery to handle copying from the Query Tool. > Apart from this the code looks good to me. Thanks - will apply. > > On Tue, May 21, 2013 at 4:26 AM, Dave Page <dpage@pgadmin.org> wrote: >> >> >> >> On Friday, May 17, 2013, Michael Shapiro wrote: >>> >>> I am running 1.16.1 (Windows 7). I can reproduce this. It makes a >>> difference, though, if you use ctrl-c vs the right-click/Copy. ctrl-c does >>> the whole entry, right-click/Copy gets just what is highlighted. ctrl-c gets >>> the whole entry even if nothing is highlighted. >>> >>> >>> On Fri, May 17, 2013 at 5:34 AM, Kieran <kieran.mccusker@kwest.co> wrote: >>>> >>>> Hi >>>> >>>> Sorry if this has been raised before, but it's been a nuisance to me for >>>> quite a while and I thought I should mention it. >>>> >>>> To reproduce the problem :- >>>> >>>> 1. Open the Edit Data window on a table >>>> 2. Click into a text field containing some text and highlight a single >>>> word >>>> 3. Paste what you have just copied. >>>> >>>> You will get the whole contents of the field not what you just >>>> highlighted. >>>> >>>> My environment is >>>> Windows Vista >>>> pgAdmin 1.16.1 >>>> >> >> I believe the attached patch fixes this. With it, if you're in Edit Mode >> in a cell, then Copy works more like it would in a regular text box - only >> the highlighted text is copied, and there are no quotes etc. added. In View >> Mode, whatever cells are selected will be copied, and quoting/delimiting >> applied. >> >> Can someone review it please (Dhiraj :-p )? >> >> Thanks. >> >> >> -- >> Dave Page >> Blog: http://pgsnake.blogspot.com >> Twitter: @pgsnake >> >> EnterpriseDB UK: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> > > > > -- > regards, > > Dhiraj Chawla > Software Engineer > EnterpriseDB Corporation > The Enterprise PostgreSQL Company > > Phone: +91-20-30589522 -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company