Hi,

I have here a small patch to disable the remove-button at the chart-colors if there is no color to remove. This makes it more consistent for the GUI.

--
Greetings,
Rob Snelders
>From 0f64b62344f6c0fdc2f6d1460bdfb1cb3bd3f2ed Mon Sep 17 00:00:00 2001
From: Rob Snelders <programm...@ertai.nl>
Date: Wed, 8 Jun 2011 18:21:02 +0200
Subject: [PATCH] Disable Removebutton in optchart

---
 cui/source/options/optchart.cxx |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 422c720..6293a8f 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -196,6 +196,7 @@ IMPL_LINK( SvxDefaultColorOptPage, ResetToDefaults, void *, EMPTYARG )
 
         aLbChartColors.GetFocus();
         aLbChartColors.SelectEntryPos( 0 );
+        aPBRemove.Enable( sal_True );
     }
 
     return 0L;
@@ -217,6 +218,7 @@ IMPL_LINK( SvxDefaultColorOptPage, AddChartColor, void *, EMPTYARG )
 
         aLbChartColors.GetFocus();
         aLbChartColors.SelectEntryPos( pColorConfig->GetColorTable().size() - 1 );
+        aPBRemove.Enable( sal_True );
     }
 
     return 0L;
@@ -251,6 +253,8 @@ IMPL_LINK( SvxDefaultColorOptPage, RemoveChartColor, PushButton*, pButton )
                 aLbChartColors.SelectEntryPos( pColorConfig->GetColorTable().size() - 1 );
             else if (aLbChartColors.GetEntryCount() > 0)
                 aLbChartColors.SelectEntryPos( nIndex );
+            else
+                aPBRemove.Enable( sal_False );
         }
     }
 
-- 
1.7.0.4

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to