[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/krita/ui
From:       Gábor Lehel <illissius () gmail ! com>
Date:       2006-01-01 19:56:20
Message-ID: 1136145380.249899.8044.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 493192 by illissius:

fix: when setting the opacity, it would keep jumping back up to 100. this is because I failed to notice \
that KisLayer::opacity() actually has a range of 255 ;/

 M  +5 -1      kis_layerbox.cc  


--- trunk/koffice/krita/ui/kis_layerbox.cc #493191:493192
@@ -288,6 +288,8 @@
     m_lst -> bnDelete -> setEnabled(list() -> activeLayer());
     m_lst -> bnRaise -> setEnabled(list() -> activeLayer() && list() -> activeLayer() -> prevSibling());
     m_lst -> bnLower -> setEnabled(list() -> activeLayer() && list() -> activeLayer() -> nextSibling());
+    m_lst -> intOpacity -> setEnabled(list() -> activeLayer());
+    m_lst -> cmbComposite -> setEnabled(list() -> activeLayer());
     if (m_image)
         if (KisLayerSP active = m_image -> activeLayer())
         {
@@ -295,7 +297,9 @@
                 slotSetColorSpace(m_image -> activeDevice() -> colorSpace());
             else
                 slotSetColorSpace(m_image -> colorSpace());
-            m_lst -> intOpacity -> setValue(active -> opacity());
+
+            //isn't accurate, and gets into a loop feeding each other slightly different values
+            //m_lst -> intOpacity -> setValue(active -> opacity() * 100 / 255);
             m_lst -> cmbComposite -> setCurrentItem(active -> compositeOp());
         }
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic