Hi Carsten,
I have changed the source for issue53677 and submitted it to the issuezilla.
please, review it.

Thanks

Kind Regards
Shizhoubo
--- cfg.cxx_old 2008-01-30 13:39:44.000000000 +0800
+++ cfg.cxx     2008-02-20 16:34:20.000000000 +0800
@@ -2370,8 +2370,8 @@
                aContentsListBox->GetModel()->Move( pSourceEntry, pTargetEntry 
);
                aContentsListBox->Select( pToSelect );
                aContentsListBox->MakeVisible( pToSelect );
-
                UpdateButtonStates();
+
        }
 }
 
@@ -4899,9 +4899,17 @@
 {
        PopupMenu* pPopup = aModifyCommandButton.GetPopupMenu();
 
-       // disable all buttons first and then re-enable buttons as needed
-       aMoveUpButton.Enable( FALSE );
-       aMoveDownButton.Enable( FALSE );
+       //Always enable Up and Down buttons
+       // added for issue53677 by shizhoubo
+       aMoveDownButton.Enable(TRUE);
+    aMoveUpButton.Enable(TRUE);
+       SvLBoxEntry* selection = aContentsListBox->GetCurEntry();
+       SvLBoxEntry* first = aContentsListBox->First();
+       SvLBoxEntry* last = aContentsListBox->Last();
+    if (selection == first || selection == last)
+    {
+                   return;
+    }
 
        pPopup->EnableItem( ID_RENAME, FALSE );
        pPopup->EnableItem( ID_DELETE, FALSE );
@@ -4915,18 +4923,11 @@
 
     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