Commit e31ed775 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: respect the "Always adjust column width" settings



Task-number: QTCREATORBUG-6527
Change-Id: I53e68dbf75d3a025d760d948a31c49f9cdf93919
Reviewed-by: default avatarRobert Löhning <robert.loehning@nokia.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 34033aea
......@@ -94,6 +94,8 @@ bool BaseWindow::handleBaseContextAction(QAction *act)
return true;
}
if (act == m_alwaysAdjustColumnsAction) {
if (act->isChecked())
resizeColumnsToContents();
// Action triggered automatically.
return true;
}
......@@ -121,5 +123,13 @@ void BaseWindow::setAlwaysResizeColumnsToContents(bool on)
header()->setResizeMode(0, mode);
}
void BaseWindow::reset()
{
QTreeView::reset();
if (header() && m_alwaysAdjustColumnsAction
&& m_alwaysAdjustColumnsAction->isChecked())
resizeColumnsToContents();
}
} // namespace Internal
} // namespace Debugger
......@@ -59,6 +59,7 @@ public slots:
private slots:
void setAlternatingRowColorsHelper(bool on) { setAlternatingRowColors(on); }
void rowActivatedHelper(const QModelIndex &index) { rowActivated(index); }
void reset();
private:
QAction *m_alwaysAdjustColumnsAction;
......
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