mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Set checked status of menu entry for dive list filter correctly
When enabling the dive list filter via the menu entry "Log->Filter dives" and then switch off the filter via the small "close" button of the filter: Set the checked status of the menu entry correctly. Also set it correctly when switching on/off via the menu entry to avoid any situation where it is not synced. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
215f61175d
commit
81492b8cba
3 changed files with 13 additions and 2 deletions
|
@ -1945,10 +1945,19 @@ void MainWindow::on_paste_triggered()
|
||||||
|
|
||||||
void MainWindow::on_actionFilterTags_triggered()
|
void MainWindow::on_actionFilterTags_triggered()
|
||||||
{
|
{
|
||||||
if (ui.multiFilter->isVisible())
|
if (ui.multiFilter->isVisible()) {
|
||||||
ui.multiFilter->closeFilter();
|
ui.multiFilter->closeFilter();
|
||||||
else
|
ui.actionFilterTags->setChecked(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
ui.multiFilter->setVisible(true);
|
ui.multiFilter->setVisible(true);
|
||||||
|
ui.actionFilterTags->setChecked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::setCheckedActionFilterTags(bool checked)
|
||||||
|
{
|
||||||
|
ui.actionFilterTags->setChecked(checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight)
|
void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight)
|
||||||
|
|
|
@ -87,6 +87,7 @@ public:
|
||||||
QUndoStack *undoStack;
|
QUndoStack *undoStack;
|
||||||
NotificationWidget *getNotificationWidget();
|
NotificationWidget *getNotificationWidget();
|
||||||
void enableDisableCloudActions();
|
void enableDisableCloudActions();
|
||||||
|
void setCheckedActionFilterTags(bool checked);
|
||||||
|
|
||||||
private
|
private
|
||||||
slots:
|
slots:
|
||||||
|
|
|
@ -653,6 +653,7 @@ void MultiFilter::closeFilter()
|
||||||
{
|
{
|
||||||
MultiFilterSortModel::instance()->clearFilter();
|
MultiFilterSortModel::instance()->clearFilter();
|
||||||
hide();
|
hide();
|
||||||
|
MainWindow::instance()->setCheckedActionFilterTags(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
TextHyperlinkEventFilter::TextHyperlinkEventFilter(QTextEdit *txtEdit) : QObject(txtEdit),
|
TextHyperlinkEventFilter::TextHyperlinkEventFilter(QTextEdit *txtEdit) : QObject(txtEdit),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue