aboutsummaryrefslogtreecommitdiff
path: root/qdeduper
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-23 00:52:40 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2022-09-23 00:52:40 -0400
commitb41305a7ef92977fe24d365393242e963ceed40f (patch)
tree2ffff0594ce3ae4b38b8e20a90c02972fc1688a0 /qdeduper
parentbabdd53be8b304e2c4a8786774fea7186e8d979f (diff)
downloaddeduper-b41305a7ef92977fe24d365393242e963ceed40f.tar.xz
Add menu item for single item mode.
Diffstat (limited to 'qdeduper')
-rw-r--r--qdeduper/mingui.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qdeduper/mingui.cpp b/qdeduper/mingui.cpp
index 29cf416..4f5b854 100644
--- a/qdeduper/mingui.cpp
+++ b/qdeduper/mingui.cpp
@@ -146,6 +146,7 @@ DeduperMainWindow::DeduperMainWindow()
QTimer::singleShot(5, [this, i] {
lv->scrollTo(im->index(i, 0), QAbstractItemView::ScrollHint::PositionAtTop);});
}
+ menuact["single_mode_toggle"]->setChecked(id->is_single_item_mode());
});
selhk.push_back(ca);
}
@@ -303,6 +304,14 @@ void DeduperMainWindow::setup_menu()
this->addAction(skip);
view->addSeparator();
+ QAction *singlemode = view->addAction("Single Item Mode");
+ singlemode->setCheckable(true);
+ menuact["single_mode_toggle"] = singlemode;
+ QObject::connect(singlemode, &QAction::triggered, [this] (bool c) {
+ id->set_single_item_mode(c);
+ });
+
+ view->addSeparator();
QMenu *sort = view->addMenu("Sort by");
sort->addAction("File size");
sort->addAction("Image dimension");