Skip to content

Commit

Permalink
Fixed Select None action to be enabled when there is any selection
Browse files Browse the repository at this point in the history
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 47b5f20
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/tiled/mapdocumentactionhandler.cpp
Expand Up @@ -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());

Expand Down

0 comments on commit 47b5f20

Please sign in to comment.