Comments (3)
Further, if in the above steps you instead move the root tank, it will both remove the second tank and move the root tank back to the original place. Maybe that is a better example.
from kspcommunityfixes.
So...
It's not really a "merging" of steps, but more an oversight of the consequences of inverting the undo/redo logic.
Basically, what the patch does is invert the core undo/redo logic from capturing state after events to capturing it before events.
However, I only moved at which point the state is captured for attach/detach events, not for offset/rotate events, which means you end up with twice the same state captured (in your reproduction steps, you will notice that you have to undo twice at step 3 for step 4 to happen), and the state before offsetting/rotating not being captured at all.
Now that I'm looking at it, there are actually more events that result in the same issue (same repro steps, just change step 2 with the following actions) :
- Switching between part variants
- Removing parts from symmetry
- Adding/removing part actions to action groups, and resetting part actions on the selected part
- Using the reset button of the stage manager
This will need quite a bit of work to fix them all. Basically, we need to move the call to EditorLogic.SetBackup()
before the actions take place (instead of after).
- Offset/Rotate gizmo
The backup is created from callbacks called from the gizmo componentsOnMoveEnd
/OnRotateEnd
methods, triggered when the gizmo is released. The gizmos do have aOn*Start
method, but unfortunately they aren't hooked to a callback, and those are generic components that can potentially be used elsewhere. We can still patch those methods, and compare the gizmo instance to theEditorLogic.gizmo*
fields. - Switching between part variants
Requires moving theSetBackup()
call at the beginning of theModulePartVariants.onVariantChanged
method
Doesn't work because the field is already set whenModulePartVariants.onVariantChanged
, so the changes will be saved to the backup anyway. Alternatively, we patchUIPartActionVariantSelector.SelectVariant()
- Removing parts from symmetry
Requires moving theSetBackup()
call at the beginning of thePart.RemoveFromSymmetry
method - Adding/removing part actions to action groups, and resetting part actions on the selected part
Requires moving theSetBackup()
call at the beginning of theEditorActionGroups
ResetPart
,AddActionToGroup
andRemoveActionFromGroup
methods - Using the reset button of the stage manager
Requires moving theSetBackup()
call at the beginning of theStageManager.Reset
method
Actually after further testing, it seems the backup is already created before the action, so nothing to fix here
from kspcommunityfixes.
Fix released in 1.35.0
from kspcommunityfixes.
Related Issues (20)
- Feature idea : integrate Making Less History into KSPCF HOT 2
- Investigate: switching to wrong vessel target from tracking station
- CollisionManagerFastUpdate patch breaks KerbalVR
- Enable Steam integration for non-steam installs HOT 1
- Custom LRTR tech tree icons not showing HOT 4
- Scanning arm abort is too sensitive HOT 1
- Stronger robotic joints
- Loading and general core infrastructure micro-optimization
- Rotating a part in the VAB flipping the model HOT 2
- increase max scale zoom in the map view
- Search in the Part Editor of parts with none category HOT 8
- Persisted modules are losing their customisations when switched to derived/base instances.
- Duplicated textures where one is an unsupported format (e.g. DXT3) will fail to load the supported one HOT 2
- ModuleDeployablePart doesn't destroy skinned mesh objects on break
- Action Group Brakes gets locked out if Time is moved backwards with Hyperedit. HOT 5
- Nodes with underscores in the name can have issues HOT 4
- Tag search very laggy
- Part upgrade "UPGRADES APPLIED" text affecting B9PS descriptions
- QoL request: force extended burn indicator to enabled HOT 1
- SAS Direction / Target Hold gets reset on vessel focus
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kspcommunityfixes.