Skip to content

Commit

Permalink
Gui: [skip ci] fixes: Parameter Editor: Problem resizing columns in r…
Browse files Browse the repository at this point in the history
…ight panel
  • Loading branch information
wwmayer committed May 1, 2020
1 parent 3bfa795 commit 76559e9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/Gui/DlgParameterImp.cpp
Expand Up @@ -720,6 +720,20 @@ void ParameterValue::keyPressEvent (QKeyEvent* event)
}
}

void ParameterValue::resizeEvent(QResizeEvent* event)
{
#if QT_VERSION >= 0x050000
QHeaderView* hv = header();
hv->setSectionResizeMode(QHeaderView::Stretch);
#endif

QTreeWidget::resizeEvent(event);

#if QT_VERSION >= 0x050000
hv->setSectionResizeMode(QHeaderView::Interactive);
#endif
}

void ParameterValue::onChangeSelectedItem(QTreeWidgetItem* item, int col)
{
if (isItemSelected(item) && col > 0)
Expand Down
1 change: 1 addition & 0 deletions src/Gui/DlgParameterImp.h
Expand Up @@ -159,6 +159,7 @@ class ParameterValue : public QTreeWidget
void contextMenuEvent ( QContextMenuEvent* event );
/** Invokes onDeleteSelectedItem() if the "Del" key was pressed. */
void keyPressEvent (QKeyEvent* event);
void resizeEvent(QResizeEvent*);

protected Q_SLOTS:
/** Changes the value of the leaf of the selected item. */
Expand Down

0 comments on commit 76559e9

Please sign in to comment.