ID:2414752
 
Resolved
Switching between find and find-replace dialogs while in the map editor could cause the find text not to reset properly.
BYOND Version:511
Operating System:Windows 7 Pro
Web Browser:Chrome 70.0.3538.110
Applies to:Dream Maker
Status: Resolved (512.1459)

This issue has been resolved.
Descriptive Problem Summary:
Sometimes when you try to find an instance, the input doesn't default to it's path, requiring you to close the input window and repeat the command. Then it works fine.

Numbered Steps to Reproduce Problem:
1. Select /obj/ on the tree.
2. Use CTRL+F or Find Instance. It shows "/obj/" as the default input.
3. Select /turf/.
4. CTRL+F. It still has "/obj/" instead of "/turf/".
Lummox JR resolved issue with message:
Switching between find and find-replace dialogs while in the map editor could cause the find text not to reset properly.
I finally figured out what was happening here and it was kind of nasty to track down. Part of the problem was that your steps to reproduce the problem were incorrect; using only the object tree did not cause this problem to occur.

To reliably reproduce this problem:

1) Click any object on the tree.
2) Hit Ctrl+F. The Find dialog will appear, but it will have the same find string as an earlier appearance by this dialog. It will not necessarily match the object you selected, and this is correct behavior so far.
3) Click another object on the object tree.
4) In the instance list (NOT the object tree), right-click the object and choose "Find Instance(s) on Map". The Find & Replace dialog will appear, and although the find string should be filled in with this object's path, the find string will be the same as it was earlier.

This fix will not make the behavior match what you're expecting 100%, because using Ctrl+F from the tree will not fill in the path. That's a feature request. The "Find Instances on Map" option will fill in the path; the bug is that in some cases, it does not.

I determined the problem was because the act of switching between Find and Find & Replace, or vice-versa, caused the box to appear prematurely which impacted logic to check if it was already open.