Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47374 - in /trunk/qt: package/yast2-qt.changes src/YQSelectionBox.cc src/YQTable.cc
  • From: sh-sh-sh@xxxxxxxxxxxxxxxx
  • Date: Thu, 08 May 2008 10:05:03 -0000
  • Message-id: <20080508100503.65C082DD28@xxxxxxxxxxxxxxxx>
Author: sh-sh-sh
Date: Thu May 8 12:05:02 2008
New Revision: 47374

URL: http://svn.opensuse.org/viewcvs/yast?rev=47374&view=rev
Log:
Don't let Qt override YSelectionBox selection

Modified:
trunk/qt/package/yast2-qt.changes
trunk/qt/src/YQSelectionBox.cc
trunk/qt/src/YQTable.cc

Modified: trunk/qt/package/yast2-qt.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/package/yast2-qt.changes?rev=47374&r1=47373&r2=47374&view=diff
==============================================================================
--- trunk/qt/package/yast2-qt.changes (original)
+++ trunk/qt/package/yast2-qt.changes Thu May 8 12:05:02 2008
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Thu May 8 11:59:11 CEST 2008 - sh@xxxxxxx
+
+- Don't let Qt override YSelectionBox selection
+
+-------------------------------------------------------------------
Wed Apr 30 17:43:03 CEST 2008 - sh@xxxxxxx

- Fixed bnc #379904: More than one radio button checked

Modified: trunk/qt/src/YQSelectionBox.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQSelectionBox.cc?rev=47374&r1=47373&r2=47374&view=diff
==============================================================================
--- trunk/qt/src/YQSelectionBox.cc (original)
+++ trunk/qt/src/YQSelectionBox.cc Thu May 8 12:05:02 2008
@@ -271,7 +271,17 @@
QList<QListWidgetItem *> items = _qt_listWidget->selectedItems();

if ( ! items.empty() )
+ {
selectItem( _qt_listWidget->row( items.first() ) );
+ }
+ else
+ {
+ // Qt thinks it has to outsmart libyui: It might not select anything.
+ // So let's get our old selection back. Tit for tat.
+
+ if ( hasItems() && hasSelectedItem() )
+ YQSelectionBox::selectItem( YSelectionWidget::selectedItem(), true
);
+ }

if ( notify() )
{

Modified: trunk/qt/src/YQTable.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQTable.cc?rev=47374&r1=47373&r2=47374&view=diff
==============================================================================
--- trunk/qt/src/YQTable.cc (original)
+++ trunk/qt/src/YQTable.cc Thu May 8 12:05:02 2008
@@ -204,7 +204,15 @@
void
YQTable::slotSelected( QTreeWidgetItem * listViewItem )
{
- selectOrigItem( listViewItem );
+ if ( listViewItem )
+ selectOrigItem( listViewItem );
+ else
+ {
+ // Qt might select nothing if a user clicks outside the items in the
widget
+
+ if ( hasItems() && YSelectionWidget::hasSelectedItem() )
+ YQTable::selectItem( YSelectionWidget::selectedItem(), true );
+ }

if ( immediateMode() )
{

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages