better UI handling for event views
authorKonrad Rosenbaum <konrad@silmor.de>
Mon, 7 Oct 2013 19:04:51 +0000 (21:04 +0200)
committerKonrad Rosenbaum <konrad@silmor.de>
Mon, 7 Oct 2013 19:04:51 +0000 (21:04 +0200)
src/dialogs/eventedit.cpp
src/mwin/eventstab.cpp

index b55151e..610a2f9 100644 (file)
@@ -4,7 +4,7 @@
 // Description: 
 //
 //
-// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007-2011
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007-2013
 //
 // Copyright: See README/COPYING.GPL files that come with this distribution
 //
@@ -170,6 +170,9 @@ MEventEditor::MEventEditor(QWidget*pw,qint64 id)
        connect(p,SIGNAL(clicked()),this,SLOT(removePrice()));
        pricetable->setModel(pricemodel=new QStandardItemModel(this));
        pricetable->setEditTriggers(QAbstractItemView::NoEditTriggers);
+        pricetable->setSelectionMode(QAbstractItemView::SingleSelection);
+        pricetable->setSelectionBehavior(QAbstractItemView::SelectRows);
+        vl2->addWidget(new QLabel(tr("Hint: Prices with the lowest Ordering number are shown first when selecting a category for tickets.")));
        updatePrice();
        
        vl->addLayout(hl=new QHBoxLayout,0);
index bf5f94a..1017e8a 100644 (file)
@@ -4,7 +4,7 @@
 // Description: 
 //
 //
-// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007-2011
+// Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2007-2013
 //
 // Copyright: See README/COPYING.GPL files that come with this distribution
 //
@@ -56,6 +56,7 @@ MEventsTab::MEventsTab(QString pk)
        hl->addWidget(eventtable=new QTableView,10);
        eventtable->setModel(eventmodel=new QStandardItemModel(this));
        eventtable->setSelectionMode(QAbstractItemView::SingleSelection);
+        eventtable->setSelectionBehavior(QAbstractItemView::SelectRows);
        eventtable->setEditTriggers(QAbstractItemView::NoEditTriggers);
        eventtable->verticalHeader()->hide();
        hl->addSpacing(5);