Editors content gets replaced by other items content

Bug #1269582 reported by Vadim Peretokin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mudlet
Fix Released
High
Chris

Bug Description

In Mudlet/development, most likely due to the keyboard navigation change, an issue has started appearing where the content of another item would suddenly get replaced with the content of a previous item you were looking at. The exact sequence to repeat this problem still needs to be determined.

Changed in mudlet:
milestone: none → 3.0
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

The issue is that the save event is going off after the item switch event now:

slot_trigger_selected
slot_item_selected_save

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

This implies that itemClicked is going off before currentItemChanged in the QTreeWidget.

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

An easy way to reproduce this is to make an edit to a trigger, then click on the trigger below it. Going back, you'll see your triggers edit wasn't saved - the feature that saves stuff when you leave it got broken. So ideally, slot_item_selected_save would be going off first, and on some event like 'selection is changing'.

Current setup:
slot_trigger_selected = currentItemChanged
slot_item_selected_save = itemClicked

Revision history for this message
Chris (chrismudlet) wrote : Re: [Bug 1269582] Re: Editors content gets replaced by other items content

Yes, the logic for those things is rather explicit. Because you click it to
change it

sent from my phone
On Jan 22, 2014 2:55 PM, "Vadim Peretokin" <email address hidden> wrote:

> This implies that itemClicked is going off before currentItemChanged in
> the QTreeWidget.
>
> --
> You received this bug notification because you are subscribed to Mudlet.
> https://bugs.launchpad.net/bugs/1269582
>
> Title:
> Editors content gets replaced by other items content
>
> Status in Mudlet the MUD client:
> New
>
> Bug description:
> In Mudlet/development, most likely due to the keyboard navigation
> change, an issue has started appearing where the content of another
> item would suddenly get replaced with the content of a previous item
> you were looking at. The exact sequence to repeat this problem still
> needs to be determined.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mudlet/+bug/1269582/+subscriptions
>

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

The difficult part is making it save when you navigate away from that item, which is what should happen by design. We might have to make it save the previous item as given by currentItemChanged to save the content first and then to the change.

Changed in mudlet:
assignee: nobody → Vadim Peretokin (vperetokin)
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Fixed in Mudlet/development.

Changed in mudlet:
status: New → Fix Committed
Revision history for this message
Vadim Peretokin (vperetokin) wrote :

When you edit an item, don't save it yet, and hit Add item, the previous item does not get saved. save*() needs to be called whenever before the selection is manually changed, which includes this case.

Changed in mudlet:
importance: Undecided → Critical
importance: Critical → High
status: Fix Committed → Confirmed
Revision history for this message
Stephen Lyons (slysven) wrote :

Is this the same thing that I'm seeing where if I click to goto the Variable Display/Editor I can actually SEE it wiping all the content out of the Lua code entry window for the item I was on. It was making the scripts I'm currently trying to get working for a new (to me) Mud get like Swiss cheese - only happens when I go to the Variable tab as far as I can see.

Revision history for this message
Stephen Lyons (slysven) wrote :

I was wrong it does involve switching between all the tabs...

Can you give me a pointer to the Fix (where is it committed?) or patch?

Revision history for this message
Chris (chrismudlet) wrote :

So this is a change that vadi was working with I believe. I left it to him
to implement and haven't looked at the relevant code in a bit. Can you give
a step by step to reproduce it?

Sent from my phone.
On Jun 30, 2014 12:09 PM, "Stephen Lyons" <email address hidden>
wrote:

> I was wrong it does involve switching between all the tabs...
>
> Can you give me a pointer to the Fix (where is it committed?) or patch?
>
> --
> You received this bug notification because you are subscribed to Mudlet.
> https://bugs.launchpad.net/bugs/1269582
>
> Title:
> Editors content gets replaced by other items content
>
> Status in Mudlet the MUD client:
> Confirmed
>
> Bug description:
> In Mudlet/development, most likely due to the keyboard navigation
> change, an issue has started appearing where the content of another
> item would suddenly get replaced with the content of a previous item
> you were looking at. The exact sequence to repeat this problem still
> needs to be determined.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mudlet/+bug/1269582/+subscriptions
>

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

I don't recall if I've finished it. I think I solved one scenario and that
opened up another. The order that the events were happening in was a bit of
a can of worms.

On Tue, Jul 1, 2014 at 3:22 AM, Chris <email address hidden> wrote:

> So this is a change that vadi was working with I believe. I left it to him
> to implement and haven't looked at the relevant code in a bit. Can you give
> a step by step to reproduce it?
>
> Sent from my phone.
> On Jun 30, 2014 12:09 PM, "Stephen Lyons" <email address hidden>
> wrote:
>
> > I was wrong it does involve switching between all the tabs...
> >
> > Can you give me a pointer to the Fix (where is it committed?) or patch?
> >
> > --
> > You received this bug notification because you are subscribed to Mudlet.
> > https://bugs.launchpad.net/bugs/1269582
> >
> > Title:
> > Editors content gets replaced by other items content
> >
> > Status in Mudlet the MUD client:
> > Confirmed
> >
> > Bug description:
> > In Mudlet/development, most likely due to the keyboard navigation
> > change, an issue has started appearing where the content of another
> > item would suddenly get replaced with the content of a previous item
> > you were looking at. The exact sequence to repeat this problem still
> > needs to be determined.
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/mudlet/+bug/1269582/+subscriptions
> >
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1269582
>
> Title:
> Editors content gets replaced by other items content
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mudlet/+bug/1269582/+subscriptions
>

Revision history for this message
Stephen Lyons (slysven) wrote :

Use the Editor to work on a script for an Alias/Script or Trigger, take a copy of the contents of the working area on the right (e.g. under all the trigger settings stuff on THAT tab) so that you can replace them. Now click on one of the other tabs (originally I thought it was just the variable one but it may not be), before the view changes to the one for the selected function I can actually see the working area be cleared, and when I switch back to that editor view it is still on the particular leaf that I left, the settings at the top of the right side are retained BUT THE CONTENTS of the editing area ARE GONE.

Now I reserve the right to mess up my copy of the codebase (I'm currently working on my mudletDev_fixTType branch) but if this a bug that is in Chris7/Mudlet2 mudletDev then it might well be appearing elsewhere...

Revision history for this message
Stephen Lyons (slysven) wrote :

Maybe I'm the early bird that got the first worm out of the can that Vadim refers to. 8-)

Revision history for this message
stratumnine (stratumnine) wrote :

I'm not sure if this is related but I have had code in the editor vanish as well. Names of group items also end up getting truncated.

Steps to reproduce:

Create a group item and give it a name.
Click add group item to make the new item a sub-item of the group you just created.
The parent item's title will be truncated (and any code inside it can vanish as well).

Revision history for this message
Vadim Peretokin (vperetokin) wrote :

Which version are you using?

On Fri, Aug 15, 2014 at 1:18 AM, Brian Salcedo <email address hidden> wrote:

> I'm not sure if this is related but I have had code in the editor vanish
> as well. Names of group items also end up getting truncated.
>
> Steps to reproduce:
>
> Create a group item and give it a name.
> Click add group item to make the new item a sub-item of the group you just
> created.
> The parent item's title will be truncated (and any code inside it can
> vanish as well).
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1269582
>
> Title:
> Editors content gets replaced by other items content
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mudlet/+bug/1269582/+subscriptions
>

Changed in mudlet:
assignee: Vadim Peretokin (vperetokin) → Chris (chrismudlet)
Revision history for this message
Ahmed Charles (ahmedcharles) wrote :

This is fixed by: https://github.com/Mudlet/Mudlet/pull/60

Note, keyboard navigation doesn't work anymore, but this bug isn't about that and keyboard navigation not working isn't a regression, and therefore, it's less urgent.

Changed in mudlet:
status: Confirmed → Fix Committed
Changed in mudlet:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.