Skip to content

Commit

Permalink
Merge pull request #77 from agrawalprash/master
Browse files Browse the repository at this point in the history
FIX: Drag starting at the tab bar (not on any tab) created an invalid drag_obj.
  • Loading branch information
agrawalprash committed Feb 1, 2013
2 parents b269c20 + 9c63716 commit 8a9f90c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyface/ui/qt4/tasks/split_editor_area_pane.py
Expand Up @@ -696,7 +696,7 @@ def create_empty_widget(self):

# generate label
label = QtGui.QLabel(parent=frame)
label.setText("""<span style='font-size:14pt; color:#999999'>
label.setText("""<span style='font-size:14px; color:#999999'>
or
</span>""")
layout.addWidget(label, alignment=QtCore.Qt.AlignHCenter)
Expand All @@ -714,7 +714,7 @@ def _open():

# generate label
label = QtGui.QLabel(parent=frame)
label.setText("""<span style='font-size:14pt; color:#999999'>
label.setText("""<span style='font-size:14px; color:#999999'>
Tip: You can also drag and drop files/tabs here.
</span>""")
layout.addWidget(label, alignment=QtCore.Qt.AlignHCenter)
Expand Down Expand Up @@ -825,7 +825,7 @@ def mousePressEvent(self, event):
if event.button()==QtCore.Qt.LeftButton:
index = self.tabAt(event.pos())
tabwidget = self.parent()
if not tabwidget.widget(index) == tabwidget.empty_widget:
if tabwidget.widget(index) and (not tabwidget.widget(index) == tabwidget.empty_widget):
self.drag_obj = TabDragObject(start_pos=event.pos(), tabBar=self)
return super(DraggableTabBar, self).mousePressEvent(event)

Expand Down

0 comments on commit 8a9f90c

Please sign in to comment.