mirror of
https://github.com/DreamSourceLab/DSView.git
synced 2025-01-23 13:42:55 +08:00
fix: The toolbar get an error checked status
This commit is contained in:
parent
4050bd7b6f
commit
0133c8a964
@ -1000,7 +1000,6 @@ namespace pv
|
|||||||
{
|
{
|
||||||
_trigger_widget->set_session(sessionObj["trigger"].toObject());
|
_trigger_widget->set_session(sessionObj["trigger"].toObject());
|
||||||
}
|
}
|
||||||
on_trigger(false);
|
|
||||||
|
|
||||||
// load decoders
|
// load decoders
|
||||||
if (sessionObj.contains("decoder"))
|
if (sessionObj.contains("decoder"))
|
||||||
@ -1086,10 +1085,6 @@ namespace pv
|
|||||||
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_RE_WIN_ST_ER), "restore window status error!"));
|
MsgBox::Show(NULL, L_S(STR_PAGE_MSG, S_ID(IDS_MSG_RE_WIN_ST_ER), "restore window status error!"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_device_agent->have_instance()){
|
|
||||||
_trig_bar->reload();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MainWindow::eventFilter(QObject *object, QEvent *event)
|
bool MainWindow::eventFilter(QObject *object, QEvent *event)
|
||||||
@ -1683,9 +1678,6 @@ namespace pv
|
|||||||
reset_all_view();
|
reset_all_view();
|
||||||
load_device_config();
|
load_device_config();
|
||||||
update_toolbar_view_status();
|
update_toolbar_view_status();
|
||||||
|
|
||||||
if (_device_agent->get_work_mode() != LOGIC)
|
|
||||||
_protocol_dock->setVisible(false);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DSV_MSG_NEW_USB_DEVICE:
|
case DSV_MSG_NEW_USB_DEVICE:
|
||||||
|
@ -53,11 +53,6 @@ TrigBar::TrigBar(SigSession *session, QWidget *parent) :
|
|||||||
setMovable(false);
|
setMovable(false);
|
||||||
setContentsMargins(0,0,0,0);
|
setContentsMargins(0,0,0,0);
|
||||||
|
|
||||||
_trig_button.setCheckable(true);
|
|
||||||
_protocol_button.setCheckable(true);
|
|
||||||
_measure_button.setCheckable(true);
|
|
||||||
_search_button.setCheckable(true);
|
|
||||||
|
|
||||||
_action_fft = new QAction(this);
|
_action_fft = new QAction(this);
|
||||||
_action_fft->setObjectName(QString::fromUtf8("actionFft"));
|
_action_fft->setObjectName(QString::fromUtf8("actionFft"));
|
||||||
|
|
||||||
@ -190,7 +185,6 @@ void TrigBar::protocol_clicked()
|
|||||||
DockOptions *opt = getDockOptions();
|
DockOptions *opt = getDockOptions();
|
||||||
opt->decodeDock = !opt->decodeDock;
|
opt->decodeDock = !opt->decodeDock;
|
||||||
sig_protocol(opt->decodeDock);
|
sig_protocol(opt->decodeDock);
|
||||||
_protocol_button.setChecked(opt->decodeDock);
|
|
||||||
AppConfig::Instance().SaveFrame();
|
AppConfig::Instance().SaveFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -202,7 +196,6 @@ void TrigBar::trigger_clicked()
|
|||||||
DockOptions *opt = getDockOptions();
|
DockOptions *opt = getDockOptions();
|
||||||
opt->triggerDock = !opt->triggerDock;
|
opt->triggerDock = !opt->triggerDock;
|
||||||
sig_trigger(opt->triggerDock);
|
sig_trigger(opt->triggerDock);
|
||||||
_trig_button.setChecked(opt->triggerDock);
|
|
||||||
AppConfig::Instance().SaveFrame();
|
AppConfig::Instance().SaveFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -214,7 +207,6 @@ void TrigBar::measure_clicked()
|
|||||||
DockOptions *opt = getDockOptions();
|
DockOptions *opt = getDockOptions();
|
||||||
opt->measureDock = !opt->measureDock;
|
opt->measureDock = !opt->measureDock;
|
||||||
sig_measure(opt->measureDock);
|
sig_measure(opt->measureDock);
|
||||||
_measure_button.setChecked(opt->measureDock);
|
|
||||||
AppConfig::Instance().SaveFrame();
|
AppConfig::Instance().SaveFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -226,7 +218,6 @@ void TrigBar::search_clicked()
|
|||||||
DockOptions *opt = getDockOptions();
|
DockOptions *opt = getDockOptions();
|
||||||
opt->searchDock = !opt->searchDock;
|
opt->searchDock = !opt->searchDock;
|
||||||
sig_search(opt->searchDock);
|
sig_search(opt->searchDock);
|
||||||
_search_button.setChecked(opt->searchDock);
|
|
||||||
AppConfig::Instance().SaveFrame();
|
AppConfig::Instance().SaveFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -265,15 +256,15 @@ void TrigBar::reload()
|
|||||||
|
|
||||||
DockOptions *opt = getDockOptions();
|
DockOptions *opt = getDockOptions();
|
||||||
|
|
||||||
sig_protocol(_protocol_action->isVisible() && opt->decodeDock);
|
bool bDecoder = _protocol_action->isVisible() && opt->decodeDock;
|
||||||
sig_trigger(_trig_action->isVisible() && opt->triggerDock);
|
bool bTrigger = _trig_action->isVisible() && opt->triggerDock;
|
||||||
sig_measure(_measure_action->isVisible() && opt->measureDock);
|
bool bMeasure = _measure_action->isVisible() && opt->measureDock;
|
||||||
sig_search(_search_action->isVisible() && opt->searchDock);
|
bool bSearch = _search_action->isVisible() && opt->searchDock;
|
||||||
|
|
||||||
_protocol_action->setChecked(opt->decodeDock);
|
sig_protocol(bDecoder);
|
||||||
_trig_action->setChecked(opt->triggerDock);
|
sig_trigger(bTrigger);
|
||||||
_measure_action->setChecked(opt->measureDock);
|
sig_measure(bMeasure);
|
||||||
_search_action->setChecked(opt->searchDock);
|
sig_search(bSearch);
|
||||||
|
|
||||||
update_view_status();
|
update_view_status();
|
||||||
update();
|
update();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user