summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-attribute-widget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/sp-attribute-widget.cpp')
-rw-r--r--src/widgets/sp-attribute-widget.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/widgets/sp-attribute-widget.cpp b/src/widgets/sp-attribute-widget.cpp
index 1f0fcd94e..fb7eb1420 100644
--- a/src/widgets/sp-attribute-widget.cpp
+++ b/src/widgets/sp-attribute-widget.cpp
@@ -101,14 +101,12 @@ SPAttributeTable::~SPAttributeTable ()
void SPAttributeTable::clear(void)
{
- Gtk::Widget *w;
-
if (table)
{
std::vector<Gtk::Widget*> ch = table->get_children();
for (int i = (ch.size())-1; i >=0 ; i--)
{
- w = ch[i];
+ Gtk::Widget *w = ch[i];
ch.pop_back();
if (w != NULL)
{
@@ -261,7 +259,7 @@ static void sp_attribute_table_object_modified ( SPObject */*object*/,
guint flags,
SPAttributeTable *spat )
{
- if (flags && SP_OBJECT_MODIFIED_FLAG)
+ if (flags & SP_OBJECT_MODIFIED_FLAG)
{
std::vector<Glib::ustring> attributes = spat->get_attributes();
std::vector<Gtk::Entry *> entries = spat->get_entries();
@@ -272,7 +270,7 @@ static void sp_attribute_table_object_modified ( SPObject */*object*/,
text = e->get_text ();
if (val || !text.empty()) {
if (text != val) {
- /* We are different */
+ // We are different
spat->blocked = true;
e->set_text (val ? val : (const gchar *) "");
spat->blocked = false;