summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-27 17:46:41 +0200
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-06-30 07:45:21 +0200
commit3c5223b232992b7c49c4827d69bc54366c7a3f48 (patch)
tree7cb1ae1e0dc59f32a6263193a1faf674288d0767 /sd/source/ui
parenta4620e23cec01169995ec7bc056c51295a4f9907 (diff)
Make sure pin box and deauth button hidden when no items selected.
Change-Id: I650191b9b092a3562c7bfcdfe40ac4968d18ae36
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/dlg/RemoteDialogClientBox.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index c8e0f998e7f5..47769d27a76d 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -465,14 +465,14 @@ void ClientBox::Paint( const Rectangle &/*rPaintRect*/ )
const ::osl::MutexGuard aGuard( m_entriesMutex );
- // If we have just removed the last entry (via deauthorise)
- // then we need to make sure we hide the button (usually
- // this would all be dealt with in in DrawRow, but that
- // won't be called for 0 items).
- if ( m_vEntries.size() == 0 )
- {
- m_aDeauthoriseButton.Show( false );
- }
+ // It's easiest to disbale these and only reenable as appropriate in DrawRow
+ // -- both are shown in only certain situations, and e.g. if we've removed
+ // the last entry then the visibility of the deauthorise button won't be
+ // changed in the loop below, or when we select 0 entries then we
+ // won't run through the appropriate conditions which would otherwise
+ // set the visibility of the pin-box.
+ m_aDeauthoriseButton.Show( false );
+ m_aPinBox.Show( false );
typedef std::vector< TClientBoxEntry >::iterator ITER;
for ( ITER iIndex = m_vEntries.begin(); iIndex < m_vEntries.end(); ++iIndex )