can't remove a widget correctly from a Gtk::ScrolledWindow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gtkmm3.0 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I've got a little program that should change the content in the left area when an item in a TreeView on the left side of the window is clicked. Everything worked well, until I changed the right areas base container to a ScrolledWindow. Now, when I remove a widget from the right area, and afterwards - somewhen in the runtime - change back to it, it can't be added anymore. I get the error
Gtk-CRITICAL **: gtk_scrolled_
I've found a bug report for something that seems to be the same, but in gtkmm 2.4: https:/
I've got a code sample as attachment that shows the problem. You can also see it when you compile my program yourself (It's available on github: https:/
ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: libgtkmm-3.0-dev 3.5.12-0ubuntu3
ProcVersionSign
Uname: Linux 3.5.0-15-generic x86_64
ApportVersion: 2.5.2-0ubuntu4
Architecture: amd64
Date: Mon Sep 24 21:36:26 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Alpha amd64+mac (20120905.2)
ProcEnviron:
PATH=(custom, no user)
LANG=de_DE.UTF-8
SHELL=/bin/bash
SourcePackage: gtkmm3.0
UpgradeStatus: No upgrade log present (probably fresh install)
This happen because you remove the viewport instead the button in your example code. add(button_ test);
when you call
main_area.
you add a Gtk::Viewport to the scrolled window, the button is then a child of the viewport.
So after the call to
main_area.remove();
you remove the viewport and the button is still a child of the viewport.