#52 cannot undo accidental removal of the root node

v1.0_(example)
closed-fixed
nobody
None
5
2013-10-17
2013-01-20
pollux
No

Hi,

I am the Debian maintainer for vym. I am forwarding here a bug report (Debian bug #698493):

The problem, as described in the original (archived) report, occurs only when
deleting the root node, otherwise the undo functions properly.

Expected outcome:
delete root node (accidentally or not)
hit undo to restore it

After deleting, undo button has no effect at all.
Also, it doesn't grey out after exhausting the number or undo levels available.
Tested on a new document, where I did not have more than 10-11 steps to undo,
so it seems to be stuck there after the mentioned deletion.

The problem becomes even more irritating if one has autosave enabled (as it is
by default) and after deleting the root node the document is lost forever.
--

Regards,
Pierre

Related

Bugs: #52

Discussion

  • pollux
    pollux
    2013-01-20

    Sorry for the (accidental) format of the bug report. I cannot edit it.

     
  • In Silmaril
    In Silmaril
    2013-01-21

    Hi Pierre,

    On Sun, Jan 20, pollux wrote:

    Sorry for the (accidental) format of the bug report. I cannot edit it.

    no problem :)

    [bugs:#52] cannot undo accidental removal of the root node

    I thought I already fixed this in june :-(

    Anyway, here is a patch for the undo() method in vymmodel.cpp:

    diff --git a/vymmodel.cpp b/vymmodel.cpp
    index 61ac182..9895416 100644
    --- a/vymmodel.cpp
    +++ b/vymmodel.cpp
    @@ -1123,7 +1123,7 @@ void VymModel::undo()
    QString bakMapDir(QString(tmpMapDir+"/undo-%1").arg(curStep));

     // select  object before undo
    
    • if (!select (undoSelection))
    • if (!undoSelection.isEmpty() && !select (undoSelection))
      {
      qWarning ("VymModel::undo() Could not select object for undo");
      return;

    I pushed a new version to git, the commit of this fix (including test
    case) is: 55b80d39148e2ed6db01026d036b1c3b051be645

    Btw. I am also building Debian versions automatically in Open Build
    Service, might this be useful for you somehow?

    https://build.opensuse.org/project/show?project=home%3Ainsilmaril

    Thanks for maintaining vym on Debian!
    Uwe

    --
    mathematician, n:
    Someone who believes imaginary things appear right before your i's.

     

    Related

    Bugs: #52

  • pollux
    pollux
    2013-10-06

    Hi Uwe,

    For some reason the previous mail felt into the spam box, so I did not notice it ..

    I have tested removing the root node, and undo with version 2.3.20, and it seems to work correctly. I think this bug should be closed.

    About the autobuilder, it may be useful, especially if you are building for the Debian stable distribution (currently wheezy) with newer versions. In Debian, only unstable and testing get new versions. However, we should try keeping the differences between the official packages and these ones as small as possible to make maintenance easier. BTW, about patches, I have a few patches to send to you, I'll use separate bug reports to make things clean.

    Best regards,
    Pierre

     
  • In Silmaril
    In Silmaril
    2013-10-17

    I have to admit I am not familiar with Debian/Ubuntu, just got the control file to work on a rudimentary level :-/ Any help appreciated here ;-)

     
  • In Silmaril
    In Silmaril
    2013-10-17

    • status: open --> closed-fixed
    • Group: --> v1.0_(example)