2
0
forked from Ivasoft/DSView

fix: load file popups an error dialog about trigger support

This commit is contained in:
dreamsourcelabTAI
2022-06-16 17:52:45 +08:00
parent 8bf2591110
commit 23f3310b22
5 changed files with 11 additions and 4 deletions

View File

@@ -35,6 +35,7 @@ DevInst::DevInst() :
_usable(true)
{
_id = malloc(1);
_is_file = false;
}
DevInst::~DevInst()

View File

@@ -105,13 +105,15 @@ public:
*
* @return device name
*/
QString name();
QString name();
bool is_usable();
void destroy();
inline bool is_file(){
return _is_file;
}
public:
virtual void start();
@@ -139,6 +141,7 @@ protected:
SigSession *_owner;
void *_id;
bool _usable;
bool _is_file;
};
} // device

View File

@@ -35,6 +35,7 @@ InputFile::InputFile(QString path) :
File(path),
_input(NULL)
{
_is_file = true;
}
sr_dev_inst* InputFile::dev_inst()

View File

@@ -29,6 +29,7 @@ SessionFile::SessionFile(QString path) :
File(path)
{
_sdi = NULL;
_is_file = true;
}
sr_dev_inst* SessionFile::dev_inst()

View File

@@ -200,7 +200,8 @@ void TriggerDock::adv_trigger()
} else {
widget_enable(0);
}
} else {
}
else if (_session->get_device()->is_file() == false){
dialogs::DSMessageBox msg(this);
msg.mBox()->setText(tr("Trigger"));
msg.mBox()->setInformativeText(tr("Advanced Trigger need DSLogic Hardware Support!"));