[qet] [4059] ConductorPropertiesWidget: improve set focus to QLineEdit

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4059
Author:   scorpio810
Date:     2015-07-20 21:16:12 +0200 (Mon, 20 Jul 2015)
Log Message:
-----------
ConductorPropertiesWidget: improve set focus to QLineEdit

Modified Paths:
--------------
    trunk/sources/ui/conductorpropertieswidget.cpp
    trunk/sources/ui/conductorpropertieswidget.h

Modified: trunk/sources/ui/conductorpropertieswidget.cpp
===================================================================
--- trunk/sources/ui/conductorpropertieswidget.cpp	2015-07-20 17:45:37 UTC (rev 4058)
+++ trunk/sources/ui/conductorpropertieswidget.cpp	2015-07-20 19:16:12 UTC (rev 4059)
@@ -28,8 +28,7 @@
  */
 ConductorPropertiesWidget::ConductorPropertiesWidget(QWidget *parent) :
 	QWidget(parent),
-	ui(new Ui::ConductorPropertiesWidget),
-	m_activation (true)
+	ui(new Ui::ConductorPropertiesWidget)
 {
 	ui->setupUi(this);
 	initWidget();
@@ -125,12 +124,8 @@
  */
 bool ConductorPropertiesWidget::event(QEvent *event)
 {
-	if (m_activation)
-	{
-			if (event -> type() == QEvent::WindowActivate || event -> type() == QEvent::Show)
-			{
-					ui -> m_text_le -> setFocus();
-			}
+	if (event->type() == QEvent::WindowActivate) {
+		ui -> m_text_le -> setFocus();
 	}
 	return(QWidget::event(event));
 }

Modified: trunk/sources/ui/conductorpropertieswidget.h
===================================================================
--- trunk/sources/ui/conductorpropertieswidget.h	2015-07-20 17:45:37 UTC (rev 4058)
+++ trunk/sources/ui/conductorpropertieswidget.h	2015-07-20 19:16:12 UTC (rev 4059)
@@ -66,7 +66,6 @@
 		Ui::ConductorPropertiesWidget *ui;
 		ConductorProperties m_properties;
 		QTextOrientationSpinBoxWidget *m_verti_select, *m_horiz_select;
-		bool m_activation;
 };
 
 #endif // CONDUCTORPROPERTIESWIDGET_H


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/