Author: cazfi Date: Wed Dec 10 21:12:38 2014 New Revision: 27241 URL: http://svn.gna.org/viewcvs/freeciv?rev=27241&view=rev Log: Fixed Qt modpack installer to install modpack from list after double-click, not already when the modpack row is selected.
See bug #23029 Modified: trunk/tools/mpgui_qt.cpp trunk/tools/mpgui_qt.h Modified: trunk/tools/mpgui_qt.cpp URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/mpgui_qt.cpp?rev=27241&r1=27240&r2=27241&view=diff ============================================================================== --- trunk/tools/mpgui_qt.cpp (original) +++ trunk/tools/mpgui_qt.cpp Wed Dec 10 21:12:38 2014 @@ -208,7 +208,7 @@ mplist_table->hideColumn(ML_TYPE); connect(mplist_table, SIGNAL(cellClicked(int, int)), this, SLOT(row_selected(int, int))); - connect(mplist_table, SIGNAL(cellActivated(int, int)), this, SLOT(row_download(int, int))); + connect(mplist_table, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(row_download(QModelIndex))); main_layout->addWidget(mplist_table); @@ -403,9 +403,9 @@ /************************************************************************** User activated another table row **************************************************************************/ -void mpgui::row_download(int row, int column) -{ - QString URL = mplist_table->item(row, ML_COL_URL)->text(); +void mpgui::row_download(const QModelIndex &index) +{ + QString URL = mplist_table->item(index.row(), ML_COL_URL)->text(); URLedit->setText(URL); Modified: trunk/tools/mpgui_qt.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/tools/mpgui_qt.h?rev=27241&r1=27240&r2=27241&view=diff ============================================================================== --- trunk/tools/mpgui_qt.h (original) +++ trunk/tools/mpgui_qt.h Wed Dec 10 21:12:38 2014 @@ -46,7 +46,7 @@ private slots: void URL_given(); void row_selected(int, int); - void row_download(int, int); + void row_download(const QModelIndex &); private: QLineEdit *URLedit; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits