mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-08 08:10:30 -10:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd2e73d664 |
No files matched your search
@@ -199,6 +199,11 @@ TableWidget::TableWidget(QWidget *parent) :
|
||||
{
|
||||
}
|
||||
|
||||
bool TableWidget::isEditorOpen()
|
||||
{
|
||||
return (state() == QAbstractItemView::EditingState);
|
||||
}
|
||||
|
||||
void TableWidget::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter)
|
||||
@@ -1587,8 +1592,13 @@ QTabWidget* MainWindow::browserAndPlaylistTabWidget()
|
||||
|
||||
void MainWindow::onTableWidgetEnterPressed()
|
||||
{
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
|
||||
/* entry is being renamed, ignore this enter press */
|
||||
if (m_tableWidget->isPersistentEditorOpen(m_tableWidget->currentIndex()))
|
||||
#else
|
||||
/* we can only check if any editor at all is open */
|
||||
if (m_tableWidget->isEditorOpen())
|
||||
#endif
|
||||
return;
|
||||
onRunClicked();
|
||||
}
|
||||
|
||||
@@ -169,6 +169,7 @@ class TableWidget : public QTableWidget
|
||||
Q_OBJECT
|
||||
public:
|
||||
TableWidget(QWidget *parent = 0);
|
||||
bool isEditorOpen();
|
||||
signals:
|
||||
void enterPressed();
|
||||
void deletePressed();
|
||||
|
||||
Reference in new issue
Block a user