Commit 0d96d215 authored by Oliver Kellogg's avatar Oliver Kellogg
Browse files

umbrello/umlwidgets/widgetbase.cpp diagnostics for analyzing bug 429181:

- Static unsigned eventCnt is incremented on each call to
  QGraphicsObjectWrapper::setSelected. It is printed in a debug message
  to ease tracking of the exact call that causes the markers to stick.
- In function QGraphicsObjectWrapper::setSelected print debug message
  containing eventCnt, state, m_calledFromItemChange, and further
  detail.
parent b9f0c723
......@@ -35,10 +35,20 @@
#endif
#include <QPointer>
static unsigned eventCnt = 0;
void QGraphicsObjectWrapper::setSelected(bool state)
{
if (!m_calledFromItemChange)
QGraphicsObject::setSelected(state);
QString info;
WidgetBase *wb = dynamic_cast<WidgetBase*>(this);
if (wb)
info = wb->name();
if (info.isEmpty())
DEBUG(DBG_SRC) << ++eventCnt << " new state=" << state << ", fromItemChange=" << m_calledFromItemChange << " " << this;
else
DEBUG(DBG_SRC) << ++eventCnt << " new state=" << state << ", fromItemChange=" << m_calledFromItemChange << " " << info;
m_calledFromItemChange = false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment