diff --git a/src/designer/src/components/formeditor/formwindow.cpp b/src/designer/src/components/formeditor/formwindow.cpp
index 9ac7fb5..b9b7ddf 100644
--- a/src/designer/src/components/formeditor/formwindow.cpp
+++ b/src/designer/src/components/formeditor/formwindow.cpp
@@ -2515,7 +2515,7 @@ void FormWindow::highlightWidget(QWidget *widget, const QPoint &pos, HighlightMo
             g->adjustIndicator(pt);
         }
     } else if (QDesignerLayoutDecorationExtension *g = qt_extension<QDesignerLayoutDecorationExtension*>(core()->extensionManager(), container)) {
-        if (mode == Restore) {
+        if (mode == Restore) {            
             g->adjustIndicator(QPoint(), -1);
         } else {
             const QPoint pt = widget->mapTo(container, pos);
diff --git a/src/designer/src/lib/shared/qdesigner_command.cpp b/src/designer/src/lib/shared/qdesigner_command.cpp
index c638f63..ddcb898 100644
--- a/src/designer/src/lib/shared/qdesigner_command.cpp
+++ b/src/designer/src/lib/shared/qdesigner_command.cpp
@@ -187,6 +187,7 @@ void InsertWidgetCommand::redo()
 
     if (deco != 0) {
         const LayoutInfo::Type type = LayoutInfo::layoutType(core, LayoutInfo::managedLayout(core, parentWidget));
+        qDebug() <<         deco << type;
         m_layoutHelper = LayoutHelper::createLayoutHelper(type);
         m_layoutHelper->pushState(core, parentWidget);
         if (type == LayoutInfo::Grid) {
@@ -202,7 +203,9 @@ void InsertWidgetCommand::redo()
                 default: break;
             } // end switch
         }
+        qDebug() << ">iw";
         deco->insertWidget(m_widget, m_cell);
+        qDebug() << "<iw";
     }
 
     if (!m_widgetWasManaged)
diff --git a/src/designer/src/lib/shared/qlayout_widget.cpp b/src/designer/src/lib/shared/qlayout_widget.cpp
index 48118d7..d27d036 100644
--- a/src/designer/src/lib/shared/qlayout_widget.cpp
+++ b/src/designer/src/lib/shared/qlayout_widget.cpp
@@ -504,8 +504,10 @@ QRect LayoutHelper::itemInfo(QLayout *lt, const QWidget *widget) const
     void BoxLayoutHelper::insertWidget(QLayout *lt, const QRect &info, QWidget *w)
     {
         QDesignerWidgetItemInstaller wii; // Make sure we use QDesignerWidgetItem.
+
         QBoxLayout *boxLayout = qobject_cast<QBoxLayout *>(lt);
         Q_ASSERT(boxLayout);
+        qDebug() << __FUNCTION__ << w << info;
         boxLayout->insertWidget(m_orientation == Qt::Horizontal ? info.x() : info.y(), w);
     }
 
@@ -1334,6 +1336,7 @@ void QLayoutSupport::setInsertMode(InsertMode im)
 
 void QLayoutSupport::setCurrentCell(const QPair<int, int> &cell)
 {
+    qDebug() << __FUNCTION__ << cell;
     m_currentCell = cell;
 }
 
@@ -1346,6 +1349,7 @@ void QLayoutSupport::adjustIndicator(const QPoint &pos, int index)
         hideIndicator(BottomIndicator);
         return;
     }
+    qDebug() << __FUNCTION__ << pos << index;
     m_currentIndex = index;
     m_currentInsertMode = QDesignerLayoutDecorationExtension::InsertWidgetMode;
 
@@ -1389,6 +1393,7 @@ void QLayoutSupport::adjustIndicator(const QPoint &pos, int index)
                 showIndicator(RightIndicator, QRect(closeToLeft ? g.x() : g.right() + 1 - indicatorSize, 0, indicatorSize, r.height()), bluePalette);
 
                 const int incr = closeToLeft ? 0 : +1;
+                qDebug() <<     __FUNCTION__ <<       "index" <<     m_currentIndex << "incr" << incr;
                 setCurrentCellFromIndicator(indicatorOrientation, m_currentIndex, incr);
             }
             break;
@@ -1530,6 +1535,7 @@ void QLayoutSupport::createEmptyCells(QFormLayout *formLayout)
 
 int QLayoutSupport::findItemAt(const QPoint &pos) const
 {
+    qDebug() << Q_FUNC_INFO << pos;
     if (!layout())
         return -1;
 
@@ -1556,8 +1562,10 @@ int QLayoutSupport::findItemAt(const QPoint &pos) const
                 best = dist;
                 bestIndex = index;
             }
+            qDebug() << bestIndex << item->widget();
         }
     }
+    qDebug() << "Returns " << bestIndex;
     return bestIndex;
 }
 
@@ -1628,6 +1636,7 @@ void QBoxLayoutSupport::insertWidget(QWidget *widget, const QPair<int, int> &cel
 {
     switch (m_orientation) {
     case  Qt::Horizontal:
+        qDebug() << __FUNCTION__ << widget << cell.first << cell.second;
         helper()->insertWidget(layout(), QRect(cell.second, 0, 1, 1), widget);
         break;
     case  Qt::Vertical:
@@ -1638,6 +1647,7 @@ void QBoxLayoutSupport::insertWidget(QWidget *widget, const QPair<int, int> &cel
 
 void QBoxLayoutSupport::setCurrentCellFromIndicator(Qt::Orientation indicatorOrientation, int index, int increment)
 {
+    qDebug() << __FUNCTION__ << index << increment ;
     if (m_orientation == Qt::Horizontal && indicatorOrientation == Qt::Vertical) {
         setCurrentCell(qMakePair(0, index + increment));
     } else if (m_orientation == Qt::Vertical && indicatorOrientation == Qt::Horizontal) {
