[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [calligra/krita-infinite_canvas2-shrikrishna] krita: Repaired broken code caused by attempts to set
From: Shrikrishna Holla <shrikrishna.holla () gmail ! com>
Date: 2012-06-30 10:34:35
Message-ID: 20120630103435.3FD61A60D7 () git ! kde ! org
[Download RAW message or body]
Git commit 3a6a61462b9e479ecacc085d4a17d092dc489b39 by Shrikrishna Holla.
Committed on 30/06/2012 at 12:32.
Pushed by holla into branch 'krita-infinite_canvas2-shrikrishna'.
Repaired broken code caused by attempts to set canvas border to default pixel and to \
set the proper default zoom level
M +1 -4 krita/image/kis_image.cc
M +0 -1 krita/ui/kis_doc2.cc
M +3 -13 krita/ui/kis_zoom_manager.cc
http://commits.kde.org/calligra/3a6a61462b9e479ecacc085d4a17d092dc489b39
diff --git a/krita/image/kis_image.cc b/krita/image/kis_image.cc
index 34efb7f..54b12e8 100644
--- a/krita/image/kis_image.cc
+++ b/krita/image/kis_image.cc
@@ -1220,10 +1220,7 @@ QRect KisImage::dynamicSize(KisNodeSP rootNode, QRect extent)
{
if(rootNode)
{
- if(rootNode->name().compare("background"))
- extent |= QRect(0,0,1,1);
- else
- extent |= rootNode->extent();
+ extent |= rootNode->extent();
extent |= dynamicSize(rootNode->nextSibling(),extent);
extent |= dynamicSize(rootNode->firstChild(),extent);
diff --git a/krita/ui/kis_doc2.cc b/krita/ui/kis_doc2.cc
index f26c4fb..a9b8686 100644
--- a/krita/ui/kis_doc2.cc
+++ b/krita/ui/kis_doc2.cc
@@ -425,7 +425,6 @@ bool KisDoc2::newImage(const QString& name,
if(isCanvasInfinite())
{
QColor bg = bgColor.toQColor();
- bg.setAlpha(bgColor.opacityU8());
cfg.setCanvasBorderColor(bg);
}
else
diff --git a/krita/ui/kis_zoom_manager.cc b/krita/ui/kis_zoom_manager.cc
index 889f8b9..fdb2f92 100644
--- a/krita/ui/kis_zoom_manager.cc
+++ b/krita/ui/kis_zoom_manager.cc
@@ -81,19 +81,9 @@ void KisZoomManager::setup(KActionCollection * actionCollection)
KisImageWSP image = m_view->image();
- /* If the image has an infinite canvas, the zoom had better be set to the screen \
size.
- Else, the viewport will be focussed on a 1x1 box on startup and the brush \
strokes will therefore not look good */
- if(m_view->image()->isCanvasInfinite())
- {
- QSize sz = QApplication::desktop()->screen()->size();
- m_zoomController->setPageSize(QSizeF(sz.width() / image->xRes(), sz.height() \
/ image->yRes()));
- m_zoomController->setDocumentSize(QSizeF(sz.width() / image->xRes(), \
sz.height() / image->yRes()), true);
- }
- else ///If it's not infiniteCanvas, the pagesize may well be set by taking the \
image's static dimensions
- {
- m_zoomController->setPageSize(QSizeF(image->width() / image->xRes(), \
image->height() / image->yRes()));
- m_zoomController->setDocumentSize(QSizeF(image->width() / image->xRes(), \
image->height() / image->yRes()), true);
- }
+
+ m_zoomController->setPageSize(QSizeF(image->width() / image->xRes(), \
image->height() / image->yRes())); + \
m_zoomController->setDocumentSize(QSizeF(image->width() / image->xRes(), \
image->height() / image->yRes()), true);
m_zoomAction = m_zoomController->zoomAction();
actionCollection->addAction("zoom", m_zoomAction);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic