Skip to content

Commit f28ecc0

Browse files
committed
Restore original default for having condition format in filter line
Filter lines in Table Browser had lost conditional format entries in their context menu. This restores the original behaviour. And the name of the member boolean is changed to avoid double negations.
1 parent 2c9915d commit f28ecc0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/FilterLineEdit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FilterLineEdit::FilterLineEdit(QWidget* parent, std::vector<FilterLineEdit*>* fi
1010
QLineEdit(parent),
1111
filterList(filters),
1212
columnNumber(columnnum),
13-
no_conditional_format(true)
13+
conditional_format(true)
1414
{
1515
setPlaceholderText(tr("Filter"));
1616
setClearButtonEnabled(true);
@@ -179,7 +179,7 @@ void FilterLineEdit::showContextMenu(const QPoint &pos)
179179
});
180180

181181

182-
if(!no_conditional_format)
182+
if(conditional_format)
183183
{
184184
QAction* conditionalFormatAction;
185185
if (text().isEmpty()) {

src/FilterLineEdit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class FilterLineEdit : public QLineEdit
1818
void clear();
1919
void setText(const QString& text);
2020

21-
void setConditionFormatContextMenuEnabled(bool enable) { no_conditional_format = !enable; }
21+
void setConditionFormatContextMenuEnabled(bool enable) { conditional_format = enable; }
2222

2323
private slots:
2424
void delayedSignalTimerTriggered();
@@ -38,7 +38,7 @@ private slots:
3838
size_t columnNumber;
3939
QTimer* delaySignalTimer;
4040
QString lastValue;
41-
bool no_conditional_format;
41+
bool conditional_format;
4242

4343
private slots:
4444
void showContextMenu(const QPoint &pos);

0 commit comments

Comments
 (0)