Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
UltimateZoneBuilder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
UltimateZoneBuilder
Commits
f145eeba
Commit
f145eeba
authored
15 years ago
by
boris_i
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug where selected lines were deselected when trying to find/replace
Replacing can now be made undone
parent
e62146f4
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Plugins/BuilderModes/ClassicModes/FindReplaceMode.cs
+7
-4
7 additions, 4 deletions
Source/Plugins/BuilderModes/ClassicModes/FindReplaceMode.cs
Source/Plugins/BuilderModes/Interface/FindReplaceForm.cs
+8
-0
8 additions, 0 deletions
Source/Plugins/BuilderModes/Interface/FindReplaceForm.cs
with
15 additions
and
4 deletions
Source/Plugins/BuilderModes/ClassicModes/FindReplaceMode.cs
+
7
−
4
View file @
f145eeba
...
...
@@ -89,10 +89,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Select linedefs by sectors
foreach
(
Linedef
ld
in
General
.
Map
.
Map
.
Linedefs
)
{
bool
front
,
back
;
if
(
ld
.
Front
!=
null
)
front
=
ld
.
Front
.
Sector
.
Selected
;
else
front
=
false
;
if
(
ld
.
Back
!=
null
)
back
=
ld
.
Back
.
Sector
.
Selected
;
else
back
=
false
;
ld
.
Selected
=
front
|
back
;
if
(
ld
.
Selected
==
false
)
{
bool
front
,
back
;
if
(
ld
.
Front
!=
null
)
front
=
ld
.
Front
.
Sector
.
Selected
;
else
front
=
false
;
if
(
ld
.
Back
!=
null
)
back
=
ld
.
Back
.
Sector
.
Selected
;
else
back
=
false
;
ld
.
Selected
=
front
|
back
;
}
}
// Show toolbox window
...
...
This diff is collapsed.
Click to expand it.
Source/Plugins/BuilderModes/Interface/FindReplaceForm.cs
+
8
−
0
View file @
f145eeba
...
...
@@ -169,8 +169,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Perform the search / replace and show the results
if
(
doreplace
.
Checked
)
{
int
ticket
=
General
.
Map
.
UndoRedo
.
CreateUndo
(
"Replace "
+
searchtypes
.
SelectedItem
);
resultslist
.
Items
.
AddRange
(
finder
.
Find
(
findinput
.
Text
,
withinselection
.
Checked
,
replaceinput
.
Text
,
false
));
resultscount
.
Text
=
resultslist
.
Items
.
Count
+
" items found and replaced."
;
// Withdraw the undo step if nothing was replaced
if
(
resultslist
.
Items
.
Count
<=
0
)
{
General
.
Map
.
UndoRedo
.
WithdrawUndo
(
ticket
);
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment