Skip to content

Commit

Permalink
Restore original default for having condition format in filter line
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgrojo committed Aug 22, 2020
1 parent 2c9915d commit f28ecc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/FilterLineEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ FilterLineEdit::FilterLineEdit(QWidget* parent, std::vector<FilterLineEdit*>* fi
QLineEdit(parent),
filterList(filters),
columnNumber(columnnum),
no_conditional_format(true)
conditional_format(true)
{
setPlaceholderText(tr("Filter"));
setClearButtonEnabled(true);
Expand Down Expand Up @@ -179,7 +179,7 @@ void FilterLineEdit::showContextMenu(const QPoint &pos)
});


if(!no_conditional_format)
if(conditional_format)
{
QAction* conditionalFormatAction;
if (text().isEmpty()) {
Expand Down
4 changes: 2 additions & 2 deletions src/FilterLineEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class FilterLineEdit : public QLineEdit
void clear();
void setText(const QString& text);

void setConditionFormatContextMenuEnabled(bool enable) { no_conditional_format = !enable; }
void setConditionFormatContextMenuEnabled(bool enable) { conditional_format = enable; }

private slots:
void delayedSignalTimerTriggered();
Expand All @@ -38,7 +38,7 @@ private slots:
size_t columnNumber;
QTimer* delaySignalTimer;
QString lastValue;
bool no_conditional_format;
bool conditional_format;

private slots:
void showContextMenu(const QPoint &pos);
Expand Down

0 comments on commit f28ecc0

Please sign in to comment.