Skip to content

Commit

Permalink
fix(app): correct drag and drop behavior in selection mode
Browse files Browse the repository at this point in the history
- Update condition for drag_node item to be enabled when selection mode is NONE
- Improve logic for enabling/disabling drag and drop based on selection mode
  • Loading branch information
dingyi222666 committed Nov 28, 2024
1 parent 1946c7d commit aebbf2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/kotlin/com/dingyi/treeview/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class MainActivity : AppCompatActivity() {
menu.findItem(R.id.drag_node).apply {
isChecked = binding.treeview.supportDragging
isEnabled =
binding.treeview.selectionMode != TreeView.SelectionMode.NONE
binding.treeview.selectionMode == TreeView.SelectionMode.NONE
}
menu.findItem(R.id.select_mode).apply {
isChecked =
Expand Down

0 comments on commit aebbf2a

Please sign in to comment.