mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Still trying to solve the Toc panel crash with stdlib-debug enabled gcc.
* ControlToc::update(): get rid of the pure virutal method. * QToc::initialiseParams(): overload ControlToc method. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17708 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e37e918e38
commit
9aed8cf115
@ -77,7 +77,6 @@ bool ControlToc::initialiseParams(string const & data)
|
||||
}
|
||||
}
|
||||
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ public:
|
||||
virtual ~ControlToc() {}
|
||||
|
||||
/// \c ControlCommand inherited method.
|
||||
bool initialiseParams(std::string const & data);
|
||||
virtual bool initialiseParams(std::string const & data);
|
||||
|
||||
///
|
||||
TocList const & tocs() const;
|
||||
@ -63,10 +63,6 @@ public:
|
||||
///
|
||||
void updateBackend();
|
||||
|
||||
public:
|
||||
/// Update the model data if needed.
|
||||
virtual void update() = 0;
|
||||
|
||||
private:
|
||||
/// Return the guiname from a given cmdName of the TOC param
|
||||
docstring const getGuiName(std::string const & type) const;
|
||||
|
@ -107,6 +107,15 @@ void QToc::goTo(int type, QModelIndex const & index)
|
||||
}
|
||||
|
||||
|
||||
bool QToc::initialiseParams(std::string const & data)
|
||||
{
|
||||
if (!ControlToc::initialiseParams(data))
|
||||
return false;
|
||||
update();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void QToc::update()
|
||||
{
|
||||
updateType();
|
||||
|
@ -32,7 +32,11 @@ class QToc : public QObject, public ControlToc
|
||||
public:
|
||||
|
||||
QToc(Dialog &);
|
||||
virtual ~QToc() {}
|
||||
|
||||
/// \c ControlToc inherited method.
|
||||
virtual bool initialiseParams(std::string const & data);
|
||||
///
|
||||
void update();
|
||||
///
|
||||
void updateToc();
|
||||
|
Loading…
Reference in New Issue
Block a user