After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 172605 - Problems when undoing a Cut + Paste
Problems when undoing a Cut + Paste
Status: RESOLVED FIXED
Product: Gazpacho
Classification: Deprecated
Component: widget support
SVN trunk
Other Linux
: Normal normal
: ---
Assigned To: Gazpacho Maintainer(s)
Gazpacho Maintainer(s)
Depends on:
Blocks: 172261
 
 
Reported: 2005-04-04 13:05 UTC by Mattias Karlsson
Modified: 2005-04-06 23:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (569 bytes, patch)
2005-04-04 13:11 UTC, Mattias Karlsson
none Details | Review

Description Mattias Karlsson 2005-04-04 13:05:40 UTC
When undoing a Cut followed by a paste in the same location the following error
occurs:

Traceback (most recent call last):
  • File "gazpacho/application.py", line 755 in _undo_cb
    self._command_manager.undo(self._project)
  • File "/home/enki/src/gazpacho-test/gazpacho/command.py", line 43 in undo
    cmd.undo()
  • File "/home/enki/src/gazpacho-test/gazpacho/command.py", line 271 in undo
    self.execute()
  • File "/home/enki/src/gazpacho-test/gazpacho/command.py", line 618 in execute
    self._execute_undo()
  • File "/home/enki/src/gazpacho-test/gazpacho/command.py", line 629 in _execute_undo
    gparent = widget.get_widget_from_gtk_widget(parent)
  • File "/home/enki/src/gazpacho-test/gazpacho/widget.py", line 28 in get_widget_from_gtk_widget
    return gtk_widget.get_data('GladeWidgetDataTag')
AttributeError: 'NoneType' object has no attribute 'get_data'


To reproduce the bug:
1) Create a window and add a Label
2) Cut the label
3) Paste the label in the same slot as it was cut from
4) Undo bothe the Paste and the Cut
Comment 1 Mattias Karlsson 2005-04-04 13:11:40 UTC
Created attachment 39675 [details] [review]
Patch

This patch solves the problem for this particular case but I think it's only
hiding the real bug. There might be some strangeness is e.g. replace_widget()
or similar but I don't know that code that well.
Comment 2 Lorenzo Gil Sanchez 2005-04-06 23:28:55 UTC
As you said it only fix the problem in this particular case and it also
introduces other bugs.

I fixed it with very similar code as yours:

if not self._placeholder:
   self._placeholder = placeholder.Placeholder(self._app)

It's fixed in trunk