When dragging off a tab/tabs to a new float window, default to same size

* This isn't perfect, but it at least prevents the case where you drag
  off a full-size panel and the new window is tiny and crushed.
This commit is contained in:
baldurk
2017-02-14 15:27:32 +00:00
parent cba5606a83
commit 79f1edc6f0
@@ -812,7 +812,17 @@ void ToolWindowManager::finishDrag() {
}
if (m_suggestions.isEmpty()) {
if (m_allowFloatingWindow)
{
QRect r;
for(QWidget *w : m_draggedToolWindows)
r = r.united(w->rect());
moveToolWindows(m_draggedToolWindows, NewFloatingArea);
ToolWindowManagerArea *area = areaOf(m_draggedToolWindows[0]);
area->parentWidget()->resize(r.size());
}
} else {
if (m_dropCurrentSuggestionIndex >= m_suggestions.count()) {
qWarning("invalid m_dropCurrentSuggestionIndex");