Skip to content
Snippets Groups Projects
Unverified Commit 2424439f authored by Ian Bush's avatar Ian Bush Committed by GitHub
Browse files

Merge pull request #23078 from mantidproject/16440_DoubleClickForColumnOptions

Double click table column heading for column options
parents 810500e3 5b8e133b
No related merge requests found
...@@ -128,10 +128,14 @@ Table::Table(ScriptingEnv *env, int rows, int cols, const QString &label, ...@@ -128,10 +128,14 @@ Table::Table(ScriptingEnv *env, int rows, int cols, const QString &label,
SLOT(cellEdited(int, int))); SLOT(cellEdited(int, int)));
connect(d_table, SIGNAL(itemSelectionChanged()), this, connect(d_table, SIGNAL(itemSelectionChanged()), this,
SLOT(recordSelection())); SLOT(recordSelection()));
connect(d_table->horizontalHeader(), SIGNAL(sectionDoubleClicked(int)), this,
SLOT(onColumnHeaderDoubleClick()));
setAutoUpdateValues(applicationWindow()->autoUpdateTableValues()); setAutoUpdateValues(applicationWindow()->autoUpdateTableValues());
} }
void Table::onColumnHeaderDoubleClick() { emit optionsDialog(); }
void Table::setAutoUpdateValues(bool on) { void Table::setAutoUpdateValues(bool on) {
if (on) { if (on) {
connect(this, SIGNAL(modifiedData(Table *, const QString &)), this, connect(this, SIGNAL(modifiedData(Table *, const QString &)), this,
......
...@@ -173,6 +173,7 @@ public slots: ...@@ -173,6 +173,7 @@ public slots:
void moveCurrentCell(); void moveCurrentCell();
bool isEmptyRow(int row); bool isEmptyRow(int row);
bool isEmptyColumn(int col); bool isEmptyColumn(int col);
void onColumnHeaderDoubleClick();
void print() override; void print() override;
void print(const QString &fileName); void print(const QString &fileName);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment