Commit 142c8b28 authored by Dan Pascu's avatar Dan Pascu

Partially reverted patch to remove unnecessary code to disable DND

parent 946d5abe
......@@ -1598,9 +1598,11 @@ class GroupWidget(base_class, ui_class):
self.setupUi(self)
self.selected = False
self.drop_indicator = None
self._disable_dnd = False
self.label_widget.setFocusProxy(self)
self.name_view.setCurrentWidget(self.label_widget)
self.name_editor.editingFinished.connect(self._end_editing)
self.collapse_button.pressed.connect(self._collapse_button_pressed)
@property
def editing(self):
......@@ -1655,6 +1657,18 @@ class GroupWidget(base_class, ui_class):
def edit(self):
self._start_editing()
def _collapse_button_pressed(self):
self._disable_dnd = True
def mousePressEvent(self, event):
self._disable_dnd = False
super(GroupWidget, self).mousePressEvent(event)
def mouseMoveEvent(self, event):
if self._disable_dnd:
return
super(GroupWidget, self).mouseMoveEvent(event)
def paintEvent(self, event):
painter = QPainter(self)
rect = self.rect()
......
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