Mailinglist Archive: yast-commit (723 mails)

< Previous Next >
[yast-commit] r47378 - /trunk/qt/src/YQSelectionBox.cc
  • From: sh-sh-sh@xxxxxxxxxxxxxxxx
  • Date: Thu, 08 May 2008 12:53:03 -0000
  • Message-id: <20080508125303.A9BE82DD4C@xxxxxxxxxxxxxxxx>
Author: sh-sh-sh
Date: Thu May 8 14:53:03 2008
New Revision: 47378

URL: http://svn.opensuse.org/viewcvs/yast?rev=47378&view=rev
Log:
Handle fringe case: No more events delivered in YQSelectionBox
after deselectAllItems() until any other widget's event is delivered

Modified:
trunk/qt/src/YQSelectionBox.cc

Modified: trunk/qt/src/YQSelectionBox.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQSelectionBox.cc?rev=47378&r1=47377&r2=47378&view=diff
==============================================================================
--- trunk/qt/src/YQSelectionBox.cc (original)
+++ trunk/qt/src/YQSelectionBox.cc Thu May 8 14:53:03 2008
@@ -320,14 +320,24 @@

void YQSelectionBox::returnImmediately()
{
- if ( ! YQUI::ui()->eventPendingFor( this ) )
+ if ( YQUI::ui()->eventPendingFor( this ) )
{
- // Avoid overwriting a (more important) Activated event with a
- // SelectionChanged event
+ YWidgetEvent * event = dynamic_cast<YWidgetEvent *> (
YQUI::ui()->pendingEvent() );

- yuiDebug() << "Sending SelectionChanged event for " << this << endl;
- YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::SelectionChanged
) );
+ if ( event && event->reason() != YEvent::SelectionChanged )
+ {
+ // Avoid overwriting a (more important) Activated event with a
+ // SelectionChanged event
+
+ yuiDebug() << "Not overwriting more important event" << endl;
+
+ return;
+ }
}
+
+
+ yuiDebug() << "Sending SelectionChanged event for " << this << endl;
+ YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::SelectionChanged )
);
}



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

< Previous Next >
This Thread
  • No further messages