File tree Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Expand file tree Collapse file tree 3 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -228,21 +228,21 @@ void QgsLegend::mouseMoveEvent(QMouseEvent * e)
228
228
{
229
229
if (origin->parent () != dest->parent ())
230
230
{
231
- dest->parent ()->insertChild (dest->parent ()->childCount (), origin);
232
- origin->moveItem (dest);
233
- dest->moveItem (origin);
234
- }
231
+ moveItem (origin, dest);
232
+ moveItem (dest, origin);
233
+ }
235
234
else
236
- {
237
- dest-> moveItem (origin);
238
- }
239
- }
240
- }
235
+ {
236
+ moveItem (dest, origin);
237
+ }
238
+ }
239
+ }
241
240
else // over top of item
242
241
{
243
242
if (mItemBeingMoved != dest->nextSibling ())
244
243
{
245
- origin->moveItem (dest);
244
+ // origin->moveItem(dest);
245
+ moveItem (origin, dest);
246
246
}
247
247
}
248
248
setCurrentItem (origin);
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ class QgsLegendItem : public QTreeWidgetItem
85
85
QgsLegendItem* nextSibling ();
86
86
/* *Returns the younger sibling or 0 if this item is the first child of its parent*/
87
87
QgsLegendItem* findYoungerSibling ();
88
- /* *Moves this item after as an older sibling after another item*/
88
+ /* *Moves this item after ( as an older sibling) another item*/
89
89
void moveItem (QgsLegendItem* after);
90
90
/* *Removes all the children of this item. This function is for qt-4.0.1 compatibility, where
91
91
'takeChildren()' does not yet exist*/
Original file line number Diff line number Diff line change @@ -93,10 +93,10 @@ QgsLegendItem::DRAG_ACTION QgsLegendLayer::accept(const QgsLegendItem* li) const
93
93
LEGEND_ITEM_TYPE type = li->type ();
94
94
if ( type == LEGEND_LAYER)
95
95
{
96
- if (parent () == li->parent ())
97
- {
96
+ // if(parent() == li->parent())
97
+ // {
98
98
return REORDER;
99
- }
99
+ // }
100
100
}
101
101
else if (type == LEGEND_GROUP)
102
102
{
You can’t perform that action at this time.
0 commit comments