summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6dc4e3f)
raw | patch | inline | side by side (parent: 6dc4e3f)
author | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Mon, 13 Aug 2007 09:49:29 +0000 (09:49 +0000) | ||
committer | nicholasbishop <nicholasbishop@users.sourceforge.net> | |
Mon, 13 Aug 2007 09:49:29 +0000 (09:49 +0000) |
* Fixed bad update of the matrix widget, which was causing gtk warnings/criticals.
src/ui/dialog/filter-effects-dialog.cpp | patch | blob | history |
index 24ba5cfc82017aa61ad2e503adcf3fbb4dd780c8..b220b37bd154180ba2568235280a89aedab1c755 100644 (file)
{
public:
MatrixAttr(const SPAttributeEnum a)
- : AttrWidget(a)
+ : AttrWidget(a), _locked(false)
{
_model = Gtk::ListStore::create(_columns);
_tree.set_model(_model);
void update(SPObject* o, const int rows, const int cols)
{
+ if(_locked)
+ return;
+
_model->clear();
_tree.remove_all_columns();
for(int i = 0; i < cols; ++i) {
_tree.append_column_numeric_editable("", _columns.cols[i], "%.2f");
dynamic_cast<Gtk::CellRendererText*>(
- _tree.get_column(i)->get_first_cell_renderer())->signal_edited().connect(
+ _tree.get_column_cell_renderer(i))->signal_edited().connect(
sigc::mem_fun(*this, &MatrixAttr::rebind));
}
void rebind(const Glib::ustring&, const Glib::ustring&)
{
+ _locked = true;
signal_attr_changed()();
+ _locked = false;
}
+ bool _locked;
Gtk::TreeView _tree;
Glib::RefPtr<Gtk::ListStore> _model;
MatrixColumns _columns;