Feature #461

Option for not closing Find/Replace dialog automatically

Added by Miroslav Fidler about 11 years ago. Updated over 10 years ago.

Status:ApprovedStart date:04/23/2013
Priority:NormalDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:-Spent time:-
Target version:-

461_uppsrc_fix.diff Magnifier - The diff file to apply for uppsrc directory (3.03 KB) Sender Ghost, 08/17/2013 07:39 AM

Just_Ctrl_H.png - Just Ctrl + H (Linux Mint 12) (17.5 KB) Sender Ghost, 09/04/2013 04:38 AM

Ctrl_H_After_Ctrl_F.png - Ctrl + H after Ctrl + F (Linux Mint 12) (18 KB) Sender Ghost, 09/04/2013 04:38 AM

461_uppsrc2_fix.diff Magnifier - The diff file to apply for uppsrc directory (second version for r6311) (1.06 KB) Sender Ghost, 09/04/2013 09:20 PM

History

#1 Updated by Miroslav Fidler almost 11 years ago

  • Status changed from New to Approved

#2 Updated by Sender Ghost over 10 years ago

  • File 461_uppsrc_fix.diffMagnifier added
  • Status changed from Approved to Patch ready
  • Assignee set to Miroslav Fidler
  • Priority changed from Normal to High

I found a bug in current implementation (r6032).

How to reproduce:
1. Enable persistent Find/Replace dialog (Setup -> Environment -> Editor -> Do not close Find/Replace dialog automatically).
2. Try to find something with Edit -> Find and Replace -> Find.. (Ctrl + F).
3. Do the 2nd step again, but do not close the dialog, e.g. Ctrl + F, select TheIDE window caption, Ctrl + F again.

In conclusion, even persistent dialog should be closed, before invoked again.

I attached possible patch to fix this issue.

#3 Updated by Sender Ghost over 10 years ago

What I said:

In conclusion, even persistent dialog should be closed, before invoked again.

is not quite true.

It is possible to check the open state of window and don't open it again:

if(!findreplace.IsOpen())
    findreplace.Open();

But need to center already opened window (because Replace and Find type of window has different size, in case of bottom position).

#4 Updated by Miroslav Fidler over 10 years ago

  • Status changed from Patch ready to Ready for CR
  • Assignee changed from Miroslav Fidler to Sender Ghost

Feels overcomplicated... what about just closing it if it is open? (in svn now).

#5 Updated by Sender Ghost over 10 years ago

  • Assignee changed from Sender Ghost to Miroslav Fidler

Miroslav Fidler wrote:

Feels overcomplicated... what about just closing it if it is open? (in svn now).

This works, but as I already said:

need to center already opened window (because Replace and Find type of window has different size, in case of bottom position).

How to check:
1. Open "Find" dialog (Ctrl + F), type some character(s) to search, then push "Find Next" button. The "Find" dialog will change its position to bottom.
2. Click on the caption of TheIDE window or select some character(s)/word(s) with using mouse, then open "Replace in selection" dialog (Ctrl + H). The "Replace in selection" dialog will have the same bottom position, but its "Replace" and "Cancel" buttons are in below position and not very reachable. The user need to reposition the window to see button labels.

Possible fix of this issue - centered position of the window, I think.

My patch uses right place to close the window, by invoking CloseFindReplace method with true argument. If you place your changes to the same position, then it will fix mentioned issue, but it will duplicate CloseFindReplace method contents (findreplace.Close()), which I tried to avoid with my patch.

#6 Updated by Miroslav Fidler over 10 years ago

I do not know, I am trying to reproduce and everything works find. It IMO does not even make sense looking at the code: Pressing Ctrl+H leads to Close, then another Open, which centers the dialog.

I am testing with Linux Mint...

Am I doing something wrong?

#7 Updated by Sender Ghost over 10 years ago

Miroslav Fidler wrote:

Am I doing something wrong?

Seems like, you didn't enable Setup -> Environment -> Editor -> Do not close Find/Replace dialog automatically option, to test.

Miroslav Fidler wrote:

I am testing with Linux Mint...

Ok, I tested with Linux Mint 12 (which was already installed inside virtual machine). The "Replace in selection" dialog also placed to bottom (after "Find" dialog invocation), but with layout deformation (as seen on attached images).
On Windows XP, as explained in my previous comment (e.g., the part of bottom layout with buttons is under toolbar, in case of maximized window).

#8 Updated by Miroslav Fidler over 10 years ago

  • Assignee changed from Miroslav Fidler to Sender Ghost

Argh, I am an idiot... reproduced.

OK. I believe that moving Close before Setup has fixed it...

#9 Updated by Sender Ghost over 10 years ago

  • File 461_uppsrc2_fix.diffMagnifier added
  • Status changed from Ready for CR to Patch ready
  • Assignee changed from Sender Ghost to Miroslav Fidler
  • Priority changed from High to Normal

Miroslav Fidler wrote:

OK. I believe that moving Close before Setup has fixed it...

No, it doesn't.
My first patch fixes it. I also created second version of the patch, just to show what I meant.

#10 Updated by Sender Ghost over 10 years ago

  • Status changed from Patch ready to Approved

r6317

Also available in: Atom PDF