mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Remove the unclear FuncStatus::operator|=. Without knowing the internals of FuncStatus it is unsafe to use this operator, so let's not use it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34161 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3417702346
commit
5a77a063c1
@ -1121,15 +1121,13 @@ bool BufferView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
Inset * inset = editedInset(name);
|
||||
if (inset) {
|
||||
FuncRequest fr(LFUN_INSET_MODIFY, cmd.argument());
|
||||
FuncStatus fs;
|
||||
if (!inset->getStatus(cur, fr, fs)) {
|
||||
if (!inset->getStatus(cur, fr, flag)) {
|
||||
// Every inset is supposed to handle this
|
||||
LASSERT(false, break);
|
||||
}
|
||||
flag |= fs;
|
||||
} else {
|
||||
FuncRequest fr(LFUN_INSET_INSERT, cmd.argument());
|
||||
flag |= lyx::getStatus(fr);
|
||||
flag = lyx::getStatus(fr);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -28,14 +28,6 @@ void FuncStatus::clear()
|
||||
}
|
||||
|
||||
|
||||
void FuncStatus::operator|=(FuncStatus const & f)
|
||||
{
|
||||
v_ |= f.v_;
|
||||
if (!f.message_.empty())
|
||||
message_ = f.message_;
|
||||
}
|
||||
|
||||
|
||||
void FuncStatus::setUnknown(bool b)
|
||||
{
|
||||
if (b)
|
||||
|
@ -52,8 +52,6 @@ public:
|
||||
///
|
||||
void clear();
|
||||
///
|
||||
void operator|=(FuncStatus const & f);
|
||||
///
|
||||
void setUnknown(bool b);
|
||||
///
|
||||
bool unknown() const;
|
||||
|
@ -1401,7 +1401,7 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
|
||||
GuiToc * toc = static_cast<GuiToc*>(findOrBuild("toc", false));
|
||||
FuncStatus fs;
|
||||
if (toc->getStatus(documentBufferView()->cursor(), cmd, fs))
|
||||
flag |= fs;
|
||||
flag = fs;
|
||||
else
|
||||
flag.setEnabled(false);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user