I found the reason of this. It happens only after the variable watch got the null value. This condition (from todebug.cpp, method void toDebug::selectedWatch())

if (!item->text(5).isEmpty()&&item->text(5)!=QString::fromLatin1("LIST")) {

is true, since item->text(5)==QString::fromLatin1(""NULL").

and so the button to remove the watch is disabled.

I changed the line

if (!item->text(5).isEmpty()&&item->text(5)!=QString::fromLatin1("LIST"))


if (!item->text(5).isEmpty()&&item->text(5)!=QString::fromLatin1("LIST")&&item->text(5)!=QString::fromLatin1("NULL")) {

and it works.

I don't produce a patch because I don't understand a thing. When a watched variable is null the fifth column is "NULL":
          else if (ret==TO_ERROR_NULLVALUE) {
            if (toTool::globalConfig(CONF_INDICATE_EMPTY,"").isEmpty())
            item->setText(5,QString::fromLatin1("NULL"));   //<---fifth column to "NULL"

When the variable gains a value, the fifth column is still "NULL". Is this right?

Francesco Dandrea
IT Telecom, Software Factory Trento
(+39) 0461316169
Via V. Zambra 1 38100 Trento

This message and its attachments are addressed solely to the persons
above and may contain confidential information. If you have received
the message in error, be informed that any use of the content hereof
is prohibited. Please return it immediately to the sender and delete
the message. Should you have any questions, please contact us by
replying to webmaster@telecomitalia.it.
        Thank you