Gui: Add Action::setBlockedChecked
Remove the second parameter of Action::setChecked and provide Action::setBlockedChecked instead.
This commit is contained in:
@@ -3301,7 +3301,7 @@ bool StdCmdSelForward::isActive()
|
||||
DEF_STD_CMD_AC(StdTree##_name) \
|
||||
void StdTree##_name::activated(int){ \
|
||||
TreeParams::setDocumentMode(_v);\
|
||||
if(_pcAction) _pcAction->setChecked(true,true);\
|
||||
if(_pcAction) _pcAction->setBlockedChecked(true);\
|
||||
}\
|
||||
Action * StdTree##_name::createAction(void) {\
|
||||
Action *pcAction = Command::createAction();\
|
||||
@@ -3314,7 +3314,7 @@ Action * StdTree##_name::createAction(void) {\
|
||||
bool StdTree##_name::isActive() {\
|
||||
bool checked = TreeParams::getDocumentMode()==_v;\
|
||||
if(_pcAction && _pcAction->isChecked()!=checked)\
|
||||
_pcAction->setChecked(checked,true);\
|
||||
_pcAction->setBlockedChecked(checked);\
|
||||
return true;\
|
||||
}
|
||||
|
||||
@@ -3374,9 +3374,9 @@ DEF_STD_CMD_AC(StdTree##_name) \
|
||||
void StdTree##_name::activated(int){ \
|
||||
auto checked = !TreeParams::get##_name();\
|
||||
TreeParams::set##_name(checked);\
|
||||
if(_pcAction) _pcAction->setChecked(checked,true);\
|
||||
if(_pcAction) _pcAction->setBlockedChecked(checked);\
|
||||
}\
|
||||
Action * StdTree##_name::createAction(void) {\
|
||||
Action * StdTree##_name::createAction() {\
|
||||
Action *pcAction = Command::createAction();\
|
||||
pcAction->setCheckable(true);\
|
||||
pcAction->setIcon(QIcon());\
|
||||
@@ -3387,7 +3387,7 @@ Action * StdTree##_name::createAction(void) {\
|
||||
bool StdTree##_name::isActive() {\
|
||||
bool checked = TreeParams::get##_name();\
|
||||
if(_pcAction && _pcAction->isChecked()!=checked)\
|
||||
_pcAction->setChecked(checked,true);\
|
||||
_pcAction->setBlockedChecked(checked);\
|
||||
return true;\
|
||||
}
|
||||
|
||||
@@ -3576,7 +3576,7 @@ void StdCmdSelBoundingBox::activated(int iMsg)
|
||||
if(checked != ViewParams::instance()->getShowSelectionBoundingBox()) {
|
||||
ViewParams::instance()->setShowSelectionBoundingBox(checked);
|
||||
if(_pcAction)
|
||||
_pcAction->setChecked(checked,true);
|
||||
_pcAction->setBlockedChecked(checked);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3585,7 +3585,7 @@ bool StdCmdSelBoundingBox::isActive()
|
||||
if(_pcAction) {
|
||||
bool checked = _pcAction->isChecked();
|
||||
if(checked != ViewParams::instance()->getShowSelectionBoundingBox())
|
||||
_pcAction->setChecked(!checked,true);
|
||||
_pcAction->setBlockedChecked(!checked);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -3819,10 +3819,10 @@ void StdCmdDockOverlayMouseTransparent::activated(int iMsg)
|
||||
bool checked = !OverlayManager::instance()->isMouseTransparent();
|
||||
OverlayManager::instance()->setMouseTransparent(checked);
|
||||
if(_pcAction)
|
||||
_pcAction->setChecked(checked,true);
|
||||
_pcAction->setBlockedChecked(checked);
|
||||
}
|
||||
|
||||
Action * StdCmdDockOverlayMouseTransparent::createAction(void) {
|
||||
Action * StdCmdDockOverlayMouseTransparent::createAction() {
|
||||
Action *pcAction = Command::createAction();
|
||||
pcAction->setCheckable(true);
|
||||
pcAction->setIcon(QIcon());
|
||||
@@ -3834,7 +3834,7 @@ Action * StdCmdDockOverlayMouseTransparent::createAction(void) {
|
||||
bool StdCmdDockOverlayMouseTransparent::isActive() {
|
||||
bool checked = OverlayManager::instance()->isMouseTransparent();
|
||||
if(_pcAction && _pcAction->isChecked()!=checked)
|
||||
_pcAction->setChecked(checked,true);
|
||||
_pcAction->setBlockedChecked(checked);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user