Commit 8be79671 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fixed if-space-bracket problems in the changed files

parent e47a5d10
......@@ -40,14 +40,14 @@ void KisReselectGlobalSelectionCommand::redo()
{
m_canReselect = m_image->canReselectGlobalSelection();
if(m_canReselect) {
if (m_canReselect) {
m_image->reselectGlobalSelection();
}
}
void KisReselectGlobalSelectionCommand::undo()
{
if(m_canReselect) {
if (m_canReselect) {
m_image->deselectGlobalSelection();
}
}
......
......@@ -207,13 +207,13 @@ void KisImage::setGlobalSelection(KisSelectionSP globalSelection)
{
KisSelectionMaskSP selectionMask = m_d->rootLayer->selectionMask();
if(!globalSelection) {
if(selectionMask) {
if (!globalSelection) {
if (selectionMask) {
removeNode(selectionMask);
}
}
else {
if(!selectionMask) {
if (!selectionMask) {
selectionMask = new KisSelectionMask(this);
addNode(selectionMask);
selectionMask->setActive(true);
......@@ -230,7 +230,7 @@ void KisImage::setGlobalSelection(KisSelectionSP globalSelection)
void KisImage::deselectGlobalSelection()
{
KisSelectionMaskSP selectionMask = m_d->rootLayer->selectionMask();
if(selectionMask) {
if (selectionMask) {
selectionMask->setActive(false);
}
......@@ -245,7 +245,7 @@ bool KisImage::canReselectGlobalSelection()
void KisImage::reselectGlobalSelection()
{
KisSelectionMaskSP mask = deselectedMask();
if(mask) {
if (mask) {
mask->setActive(true);
}
......@@ -303,7 +303,7 @@ void KisImage::init(KisUndoStore *undoStore, qint32 width, qint32 height, const
m_d->signalRouter = new KisImageSignalRouter(this);
if(!undoStore) {
if (!undoStore) {
undoStore = new KisDumbUndoStore();
}
......@@ -364,12 +364,12 @@ bool KisImage::tryBarrierLock()
result = m_d->scheduler->tryBarrierLock();
}
if(result) {
if (result) {
m_d->sizeChangedWhileLocked = false;
}
}
if(result) {
if (result) {
m_d->lockCount++;
}
......@@ -437,7 +437,7 @@ void KisImage::setSize(const QSize& size)
void KisImage::resizeImageImpl(const QRect& newRect, bool cropLayers)
{
if(newRect == bounds()) return;
if (newRect == bounds()) return;
QString actionName = cropLayers ? i18n("Crop Image") : i18n("Resize Image");
......@@ -449,7 +449,7 @@ void KisImage::resizeImageImpl(const QRect& newRect, bool cropLayers)
KisProcessingApplicator::NO_UI_UPDATES,
emitSignals, actionName);
if(cropLayers || !newRect.topLeft().isNull()) {
if (cropLayers || !newRect.topLeft().isNull()) {
KisProcessingVisitorSP visitor =
new KisCropProcessingVisitor(newRect, cropLayers, true);
applicator.applyVisitor(visitor, KisStrokeJobData::CONCURRENT);
......@@ -500,7 +500,7 @@ void KisImage::scaleImage(const QSize &size, qreal xres, qreal yres, KisFilterSt
bool resolutionChanged = xres != xRes() && yres != yRes();
bool sizeChanged = size != this->size();
if(!resolutionChanged && !sizeChanged) return;
if (!resolutionChanged && !sizeChanged) return;
KisImageSignalVector emitSignals;
if (resolutionChanged) emitSignals << ResolutionChangedSignal;
......@@ -524,7 +524,7 @@ void KisImage::scaleImage(const QSize &size, qreal xres, qreal yres, KisFilterSt
QTransform shapesCorrection;
if(resolutionChanged) {
if (resolutionChanged) {
shapesCorrection = QTransform::fromScale(xRes() / xres, yRes() / yres);
}
......@@ -625,18 +625,18 @@ void KisImage::shearImpl(const QString &actionName,
QRect newRect = worker.transform().mapRect(bounds());
newSize = newRect.size();
if(resizeImage) offset = -newRect.topLeft();
if (resizeImage) offset = -newRect.topLeft();
}
if(newSize == size()) return;
if (newSize == size()) return;
KisImageSignalVector emitSignals;
if(resizeImage) emitSignals << SizeChangedSignal;
if (resizeImage) emitSignals << SizeChangedSignal;
emitSignals << ModifiedSignal;
KisProcessingApplicator::ProcessingFlags signalFlags =
KisProcessingApplicator::RECURSIVE;
if(resizeImage) signalFlags |= KisProcessingApplicator::NO_UI_UPDATES;
if (resizeImage) signalFlags |= KisProcessingApplicator::NO_UI_UPDATES;
KisProcessingApplicator applicator(this, rootNode,
signalFlags,
......@@ -653,7 +653,7 @@ void KisImage::shearImpl(const QString &actionName,
applicator.applyVisitor(visitor, KisStrokeJobData::CONCURRENT);
if(resizeImage) {
if (resizeImage) {
applicator.applyCommand(new KisImageResizeCommand(this, newSize));
}
......@@ -695,7 +695,7 @@ void KisImage::convertImageColorSpace(const KoColorSpace *dstColorSpace, KoColor
void KisImage::assignImageProfile(const KoColorProfile *profile)
{
if(!profile) return;
if (!profile) return;
const KoColorSpace *dstCs = KoColorSpaceRegistry::instance()->colorSpace(colorSpace()->colorModelId().id(), colorSpace()->colorDepthId().id(), profile);
const KoColorSpace *srcCs = colorSpace();
......@@ -855,7 +855,7 @@ QRect KisImage::realNodeExtent(KisNodeSP rootNode, QRect currentRect)
void KisImage::refreshHiddenArea(KisNodeSP rootNode, const QRect &preparedArea)
{
QRect realNodeRect = realNodeExtent(rootNode);
if(!preparedArea.contains(realNodeRect)) {
if (!preparedArea.contains(realNodeRect)) {
QRegion dirtyRegion = realNodeRect;
dirtyRegion -= preparedArea;
......@@ -895,7 +895,7 @@ void KisImage::flatten()
KisLayerSP KisImage::mergeDown(KisLayerSP layer, const KisMetaData::MergeStrategy* strategy)
{
if(!layer->prevSibling()) return 0;
if (!layer->prevSibling()) return 0;
// XXX: this breaks if we allow free mixing of masks and layers
KisLayerSP prevLayer = dynamic_cast<KisLayer*>(layer->prevSibling().data());
......@@ -1179,7 +1179,7 @@ KisActionRecorder* KisImage::actionRecorder() const
void KisImage::setRootLayer(KisGroupLayerSP rootLayer)
{
if(m_d->rootLayer) {
if (m_d->rootLayer) {
m_d->rootLayer->setGraphListener(0);
m_d->rootLayer->disconnect();
}
......@@ -1374,7 +1374,7 @@ void KisImage::enableUIUpdates()
void KisImage::notifyProjectionUpdated(const QRect &rc)
{
if(!m_d->disableUIUpdateSignals) {
if (!m_d->disableUIUpdateSignals) {
emit sigImageUpdated(rc);
}
}
......
......@@ -128,16 +128,16 @@ void KisSelectionMask::setActive(bool active)
KisImageWSP image = this->image();
KisLayerSP parentLayer = dynamic_cast<KisLayer*>(parent().data());
if(active && parentLayer) {
if (active && parentLayer) {
KisSelectionMaskSP activeMask = parentLayer->selectionMask();
if(activeMask) {
if (activeMask) {
activeMask->setActive(false);
}
}
nodeProperties().setProperty("active", active);
if(image) {
if (image) {
image->nodeChanged(this);
image->undoAdapter()->emitSelectionChanged();
}
......
......@@ -128,7 +128,7 @@ void KisMaskManager::createFilterMask()
void KisMaskManager::createSelectionMask(KisNodeSP parent, KisNodeSP above)
{
KisLayerSP parentLayer = dynamic_cast<KisLayer*>(parent.data());
if(!parentLayer) return;
if (!parentLayer) return;
KisSelectionMaskSP mask = new KisSelectionMask(m_view->image());
mask->initSelection(m_view->selection(), parentLayer);
......@@ -257,7 +257,7 @@ void KisMaskManager::duplicateMask()
m_commandsAdapter->addNode(newMask, m_activeMask->parent(), m_activeMask);
KisSelectionMaskSP selectionMask = dynamic_cast<KisSelectionMask*>(newMask.data());
if(selectionMask) {
if (selectionMask) {
selectionMask->setActive(true);
}
......
......@@ -237,7 +237,7 @@ bool KisSelectionManager::havePixelsSelected()
{
KisLayerSP activeLayer = m_view->activeLayer();
KisSelectionSP activeSelection;
if(activeLayer && !activeLayer->userLocked()
if (activeLayer && !activeLayer->userLocked()
&& activeLayer->visible()) {
activeSelection = activeLayer->selection();
......@@ -350,7 +350,7 @@ void KisSelectionManager::cut()
KisLayerSP layer = m_view->activeLayer();
if (!layer) return;
if(haveShapesSelected()) {
if (haveShapesSelected()) {
m_view->canvasBase()->toolProxy()->cut();
}
else {
......@@ -378,7 +378,7 @@ void KisSelectionManager::copy()
KisLayerSP layer = m_view->activeLayer();
if (!layer) return;
if(haveShapesSelected()) {
if (haveShapesSelected()) {
m_view->canvasBase()->toolProxy()->copy();
}
else {
......@@ -429,7 +429,7 @@ void KisSelectionManager::paste()
if (clip) {
// Pasted layer content could be outside image bounds and invisible, if that is the case move content into the bounds
QRect exactBounds = clip->exactBounds();
if(!exactBounds.isEmpty() && !exactBounds.intersects(image->bounds())) {
if (!exactBounds.isEmpty() && !exactBounds.intersects(image->bounds())) {
clip->setX(clip->x() - exactBounds.x());
clip->setY(clip->y() - exactBounds.y());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment