Code Monkey home page Code Monkey logo

Comments (6)

AEonZR avatar AEonZR commented on May 18, 2024

Hmm... cannot verify this.

I loaded a map into the editor, clicked int the XY View, but the map name (with full path) in the main window's title area does not add an asteric ("*"), denoting you need to save due to changes.

Hitting Ctrl+Z will not really let you test if "internally" a new undo event was added. The poster may have been looking into the source code?

from gtkradiant.

mfn avatar mfn commented on May 18, 2024

I verified this with 1.4/1.6, try these steps:

  • Start with a fresh map
  • Create a brush, de-select
  • single-click somewhere in 2d view
  • press CTRL-Z for undo

Expected: undo last brush creation operation

Result: brush is still there, press CTRL-Z again, now it's removed

from gtkradiant.

AEonZR avatar AEonZR commented on May 18, 2024

Verified your steps. Creepy.

from gtkradiant.

mfn avatar mfn commented on May 18, 2024

This applies to various other operations too, e.g. x-axis flipping without selection creates an undo entry.

Basically, many operations working on selection do not check whether there's really something to work on but simply create an undo entry an operate on an empty selection.

In c411c8a I introduced Select_HasSelection() which can be used to check this before performing the action.

from gtkradiant.

mfn avatar mfn commented on May 18, 2024

This introduces function is nice, but has a shortcoming: there are operations which do not strictly depend on "is there a selection at all", but require e.g. exactly two brushes selected.

Others may fail for various reasons other reasons and bail out in the middle.

Still, those functions are surrounded by Undo_Start/Undo_End .

I guess the right fix would be to detect Undo_End whether there was actually a real modification done and discard the entry if not

from gtkradiant.

mfn avatar mfn commented on May 18, 2024

Closing this one as it's too generic anyway. I've fixed some of the undo bugs, need separate issue for remaining bugs.

from gtkradiant.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.