Permalink
Browse files

Fixed Select None action to be enabled when there is any selection

The "Select None" action clears both the tile and the object selection,
but it was only enabled based on either selection, depending on the type
of the current layer. Now it always checks both types of selection.
  • Loading branch information...
bjorn committed Sep 30, 2018
1 parent 52d5fdc commit 47b5f20a9faf5552dffe88b66c10784c0627c82e
Showing with 1 addition and 13 deletions.
  1. +1 −13 src/tiled/mapdocumentactionhandler.cpp
@@ -721,19 +721,7 @@ void MapDocumentActionHandler::updateActions()
mActionSelectAll->setEnabled(map);
mActionSelectInverse->setEnabled(map);
if (currentLayer) {
if (currentLayer->asTileLayer()) {
mActionSelectNone->setEnabled(!selection.isEmpty());
} else if (currentLayer->asObjectGroup()) {
mActionSelectNone->setEnabled(selectedObjectsCount > 0);
} else {
mActionSelectNone->setEnabled(false);
}
} else {
mActionSelectNone->setEnabled(false);
}
mActionSelectNone->setEnabled(!selection.isEmpty() || selectedObjectsCount > 0);
mActionCropToSelection->setEnabled(!selection.isEmpty());

0 comments on commit 47b5f20

Please sign in to comment.