forked from qt-creator/qt-creator
debugger: respect the "Always adjust column width" settings
Task-number: QTCREATORBUG-6527 Change-Id: I53e68dbf75d3a025d760d948a31c49f9cdf93919 Reviewed-by: Robert Löhning <robert.loehning@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user