Hi Carsten,

This attachment is patch regarding issue53677.
I have finished it, Please review it.

Thanks!

Kind Regards
Shi Zhoubo
--- cfg.cxx_old 2008-01-30 13:39:44.000000000 +0800
+++ cfg.cxx     2008-02-15 15:30:58.000000000 +0800
@@ -2370,8 +2370,8 @@ void SvxConfigPage::MoveEntry( bool bMov
                aContentsListBox->GetModel()->Move( pSourceEntry, pTargetEntry 
);
                aContentsListBox->Select( pToSelect );
                aContentsListBox->MakeVisible( pToSelect );
-
                UpdateButtonStates();
+
        }
 }
 
@@ -4899,9 +4899,13 @@ void SvxToolbarConfigPage::UpdateButtonS
 {
        PopupMenu* pPopup = aModifyCommandButton.GetPopupMenu();
 
-       // disable all buttons first and then re-enable buttons as needed
-       aMoveUpButton.Enable( FALSE );
-       aMoveDownButton.Enable( FALSE );
+       // Disable Up and Down buttons depending on current selection
+       SvLBoxEntry* selection = aContentsListBox->GetCurEntry();
+       SvLBoxEntry* first = aContentsListBox->First();
+       SvLBoxEntry* last = aContentsListBox->Last();
+
+       aMoveUpButton.Enable( selection != first );
+       aMoveDownButton.Enable( selection != last );
 
        pPopup->EnableItem( ID_RENAME, FALSE );
        pPopup->EnableItem( ID_DELETE, FALSE );
@@ -4915,18 +4919,11 @@ void SvxToolbarConfigPage::UpdateButtonS
 
     aDescriptionField.Clear();
 
-       SvLBoxEntry* selection = aContentsListBox->GetCurEntry();
        if ( aContentsListBox->GetEntryCount() == 0 || selection == NULL )
        {
                return;
        }
 
-       SvLBoxEntry* first = aContentsListBox->First();
-       SvLBoxEntry* last = aContentsListBox->Last();
-
-       aMoveUpButton.Enable( selection != first );
-       aMoveDownButton.Enable( selection != last );
-
        SvxConfigEntry* pEntryData =
                (SvxConfigEntry*) selection->GetUserData();
 
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to