mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
Fix bug #6280: Wrong context menu is opened in an auto-opened inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31697 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
42546d3f2c
commit
f09a4ac03c
@ -1950,7 +1950,7 @@ Inset const * BufferView::getCoveringInset(Text const & text,
|
||||
if (!inset)
|
||||
return 0;
|
||||
|
||||
if (!inset->descendable())
|
||||
if (!inset->descendable(*this))
|
||||
// No need to go further down if the inset is not
|
||||
// descendable.
|
||||
return inset;
|
||||
|
@ -309,7 +309,7 @@ public:
|
||||
virtual bool hasSettings() const;
|
||||
/// can we go further down on mouse click?
|
||||
// true for InsetCaption, InsetCollapsables (not ButtonOnly), InsetTabular
|
||||
virtual bool descendable() const { return false; }
|
||||
virtual bool descendable(BufferView const &) const { return false; }
|
||||
/// is this an inset that can be moved into?
|
||||
/// FIXME: merge with editable()
|
||||
// true for InsetTabular & InsetText
|
||||
|
@ -47,7 +47,7 @@ private:
|
||||
void cursorPos(BufferView const & bv,
|
||||
CursorSlice const & sl, bool boundary, int & x, int & y) const;
|
||||
///
|
||||
bool descendable() const { return true; }
|
||||
bool descendable(BufferView const &) const { return true; }
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
|
@ -397,9 +397,9 @@ bool InsetCollapsable::editable() const
|
||||
}
|
||||
|
||||
|
||||
bool InsetCollapsable::descendable() const
|
||||
bool InsetCollapsable::descendable(BufferView const & bv) const
|
||||
{
|
||||
return geometry() != ButtonOnly;
|
||||
return geometry(bv) != ButtonOnly;
|
||||
}
|
||||
|
||||
|
||||
|
@ -67,7 +67,7 @@ public:
|
||||
///
|
||||
bool hasSettings() const { return true; }
|
||||
/// can we go further down on mouse click?
|
||||
bool descendable() const;
|
||||
bool descendable(BufferView const & bv) const;
|
||||
///
|
||||
void setLabel(docstring const & l);
|
||||
///
|
||||
|
@ -824,7 +824,7 @@ public:
|
||||
///
|
||||
Inset * editXY(Cursor & cur, int x, int y);
|
||||
/// can we go further down on mouse click?
|
||||
bool descendable() const { return true; }
|
||||
bool descendable(BufferView const & bv) const { return true; }
|
||||
// Update the counters of this inset and of its contents
|
||||
void updateLabels(ParIterator const &);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user