mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Added auto select
This commit is contained in:
parent
fce8038cf4
commit
ad65dee643
@ -354,10 +354,11 @@ void ConnectionManager::devChanged(IConnection *connection)
|
||||
{
|
||||
m_availableDevList->addItem(d.displayName);
|
||||
m_availableDevList->setItemData(m_availableDevList->count()-1,(const QString)d.devName,Qt::ToolTipRole);
|
||||
if(!m_ioDev && m_mainWindow->generalSettings()->autoConnect() && d.displayName.startsWith("USB"))
|
||||
if(!m_ioDev && d.displayName.startsWith("USB"))
|
||||
{
|
||||
qDebug()<<"INSERTION"<<d.displayName;
|
||||
if(m_mainWindow->generalSettings()->autoConnect() || m_mainWindow->generalSettings()->autoSelect())
|
||||
m_availableDevList->setCurrentIndex(m_availableDevList->count()-1);
|
||||
if(m_mainWindow->generalSettings()->autoConnect())
|
||||
connectDevice();
|
||||
}
|
||||
}
|
||||
|
@ -48,7 +48,6 @@ GeneralSettings::GeneralSettings():
|
||||
m_saveSettingsOnExit(true),
|
||||
m_autoConnect(true),m_autoSelect(true)
|
||||
{
|
||||
connect(m_page->checkAutoConnect,SIGNAL(stateChanged(int)),this,SLOT(slotAutoConnect(int)));
|
||||
}
|
||||
|
||||
QString GeneralSettings::id() const
|
||||
@ -115,6 +114,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent)
|
||||
m_page->setupUi(w);
|
||||
|
||||
fillLanguageBox();
|
||||
connect(m_page->checkAutoConnect,SIGNAL(stateChanged(int)),this,SLOT(slotAutoConnect(int)));
|
||||
m_page->checkBoxSaveOnExit->setChecked(m_saveSettingsOnExit);
|
||||
m_page->checkAutoConnect->setChecked(m_autoConnect);
|
||||
m_page->checkAutoSelect->setChecked(m_autoSelect);
|
||||
|
@ -66,7 +66,7 @@ private slots:
|
||||
void resetLanguage();
|
||||
void resetExternalEditor();
|
||||
void showHelpForExternalEditor();
|
||||
void slotAutoConnect();
|
||||
void slotAutoConnect(int);
|
||||
#ifdef Q_OS_UNIX
|
||||
void resetTerminal();
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user