summaryrefslogtreecommitdiffstats
path: root/archivecontroller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'archivecontroller.cpp')
-rw-r--r--archivecontroller.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/archivecontroller.cpp b/archivecontroller.cpp
index 338a698..0c29373 100644
--- a/archivecontroller.cpp
+++ b/archivecontroller.cpp
@@ -319,7 +319,9 @@ void ArchiveController::treeSelectionChanged(const QItemSelection &selected, con
int nodeType = sel.first().data(ArchiveModel::TypeRole).toInt();
foreach(QAction *a, mActionsForTree){
- a->setEnabled(a->data().toInt() & nodeType);
+ int aData = a->data().toInt();
+ bool enabled = (aData >> nodeType) & 1;
+ a->setEnabled(enabled);
}
}