Changeset View
Changeset View
Standalone View
Standalone View
app/imageopscontextmanageritem.cpp
Show First 20 Lines • Show All 184 Lines • ▼ Show 20 Line(s) | |||||
185 | void ImageOpsContextManagerItem::updateActions() | 185 | void ImageOpsContextManagerItem::updateActions() | ||
186 | { | 186 | { | ||
187 | bool canModify = contextManager()->currentUrlIsRasterImage(); | 187 | bool canModify = contextManager()->currentUrlIsRasterImage(); | ||
188 | bool viewMainPageIsVisible = d->mMainWindow->viewMainPage()->isVisible(); | 188 | bool viewMainPageIsVisible = d->mMainWindow->viewMainPage()->isVisible(); | ||
189 | if (!viewMainPageIsVisible) { | 189 | if (!viewMainPageIsVisible) { | ||
190 | // Since we only support image operations on one image for now, | 190 | // Since we only support image operations on one image for now, | ||
191 | // disable actions if several images are selected and the document | 191 | // disable actions if several images are selected and the document | ||
192 | // view is not visible. | 192 | // view is not visible. | ||
193 | if (contextManager()->selectedFileItemList().count() != 1) { | 193 | if (contextManager()->selectedFileItemList().count() > 1) { | ||
huoni: Maybe I shoudn't have included this change. It doesn't actually make any functional difference… | |||||
194 | canModify = false; | 194 | canModify = false; | ||
195 | } | 195 | } | ||
196 | } | 196 | } | ||
197 | 197 | | |||
198 | d->mRotateLeftAction->setEnabled(canModify); | 198 | d->mRotateLeftAction->setEnabled(canModify); | ||
199 | d->mRotateRightAction->setEnabled(canModify); | 199 | d->mRotateRightAction->setEnabled(canModify); | ||
200 | d->mMirrorAction->setEnabled(canModify); | 200 | d->mMirrorAction->setEnabled(canModify); | ||
201 | d->mFlipAction->setEnabled(canModify); | 201 | d->mFlipAction->setEnabled(canModify); | ||
▲ Show 20 Lines • Show All 107 Lines • Show Last 20 Lines |
Maybe I shoudn't have included this change. It doesn't actually make any functional difference because if no images are selected, canModify is already false due to the current URL being blank.