mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Commented out wrong code in text.C (Dekel?) some more changes for new
tabular layout! git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@879 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d02a3f2679
commit
71924df1d5
@ -105,7 +105,7 @@ void FormTabular::show()
|
||||
} else {
|
||||
fl_show_form(dialog_->form_tabular,
|
||||
FL_PLACE_MOUSE | FL_FREE_SIZE,
|
||||
FL_FULLBORDER,
|
||||
FL_TRANSIENT,
|
||||
_("Tabular Layout"));
|
||||
// u_ = d_->updateBufferDependent.connect(slot(this,
|
||||
// &FormTabular::update));
|
||||
@ -154,9 +154,12 @@ void FormTabular::update()
|
||||
}
|
||||
}
|
||||
|
||||
void FormTabular::updateInset(InsetTabular *)
|
||||
void FormTabular::updateInset(InsetTabular * ti)
|
||||
{
|
||||
inset_ = ti;
|
||||
if (ti && dialog_ && dialog_->form_tabular->visible) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
void FormTabular::input()
|
||||
|
@ -47,7 +47,7 @@ using std::endl;
|
||||
|
||||
#define cellstart(p) ((p % 2) == 0)
|
||||
|
||||
#define USE_NEW_LAYOUT 1
|
||||
//#define USE_NEW_LAYOUT 1
|
||||
|
||||
InsetTabular::InsetTabular(Buffer * buf, int rows, int columns)
|
||||
{
|
||||
@ -66,6 +66,7 @@ InsetTabular::InsetTabular(Buffer * buf, int rows, int columns)
|
||||
actcell = 0;
|
||||
cursor.pos(0);
|
||||
sel_pos_start = sel_pos_end = sel_cell_start = sel_cell_end = 0;
|
||||
dialogs_ = 0;
|
||||
need_update = INIT;
|
||||
}
|
||||
|
||||
@ -81,6 +82,7 @@ InsetTabular::InsetTabular(InsetTabular const & tab, Buffer * buf)
|
||||
actcell = 0;
|
||||
cursor.pos(0);
|
||||
sel_pos_start = sel_pos_end = sel_cell_start = sel_cell_end = 0;
|
||||
dialogs_ = 0;
|
||||
need_update = INIT;
|
||||
}
|
||||
|
||||
@ -91,6 +93,8 @@ InsetTabular::~InsetTabular()
|
||||
#ifdef USE_NEW_LAYOUT
|
||||
if (buffer->getUser())
|
||||
buffer->getUser()->owner()->getDialogs()->hideTabular(this);
|
||||
else if (dialogs_)
|
||||
dialogs_->hideTabular(this);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -430,7 +434,12 @@ bool InsetTabular::UnlockInsetInInset(BufferView * bv, UpdatableInset * inset,
|
||||
if ((inset->LyxCode() == TABULAR_CODE) &&
|
||||
!the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE))
|
||||
{
|
||||
#ifdef USE_NEW_LAYOUT
|
||||
dialogs_ = bv->owner()->getDialogs();
|
||||
dialogs_->updateTabular(const_cast<InsetTabular *>(this));
|
||||
#else
|
||||
UpdateLayoutTabular(true, const_cast<InsetTabular *>(this));
|
||||
#endif
|
||||
oldcell = actcell;
|
||||
}
|
||||
return true;
|
||||
@ -524,7 +533,8 @@ void InsetTabular::InsetButtonRelease(BufferView * bv,
|
||||
}
|
||||
}
|
||||
#ifdef USE_NEW_LAYOUT
|
||||
bv->owner()->getDialogs()->showTabular(this);
|
||||
dialogs_ = bv->owner()->getDialogs();
|
||||
dialogs_->showTabular(this);
|
||||
#if 0
|
||||
else if (ocell != actcell)
|
||||
bview->getOwner()->getPopups().updateTabular();
|
||||
@ -733,8 +743,13 @@ UpdatableInset::RESULT InsetTabular::LocalDispatch(BufferView * bv, int action,
|
||||
break;
|
||||
case LFUN_LAYOUT_TABLE:
|
||||
{
|
||||
#ifdef USE_NEW_LAYOUT
|
||||
dialogs_ = bv->owner()->getDialogs();
|
||||
dialogs_->showTabular(this);
|
||||
#else
|
||||
int flag = (arg == "true");
|
||||
MenuLayoutTabular(flag, this);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -937,7 +952,12 @@ void InsetTabular::resetPos(BufferView * bv) const
|
||||
if ((!the_locking_inset ||
|
||||
!the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE)) &&
|
||||
(actcell != oldcell)) {
|
||||
#ifdef USE_NEW_LAYOUT
|
||||
dialogs_ = bv->owner()->getDialogs();
|
||||
dialogs_->updateTabular(const_cast<InsetTabular *>(this));
|
||||
#else
|
||||
UpdateLayoutTabular(true, const_cast<InsetTabular *>(this));
|
||||
#endif
|
||||
oldcell = actcell;
|
||||
}
|
||||
}
|
||||
|
@ -225,5 +225,6 @@ private:
|
||||
bool no_selection;
|
||||
mutable bool locked;
|
||||
mutable UpdateCodes need_update;
|
||||
mutable Dialogs * dialogs_;
|
||||
};
|
||||
#endif
|
||||
|
@ -4769,10 +4769,13 @@ int LyXText::GetColumnNearX(BufferView * bview, Row * row, int & x,
|
||||
|
||||
if (row->pos() > last) // Row is empty?
|
||||
c = row->pos();
|
||||
#warning This is wrong, please have a look Dekel (Jug)
|
||||
#if 0
|
||||
else if (lastrow &&
|
||||
( (rtl && vc == row->pos()&& x < tmpx - 5) ||
|
||||
(!rtl && vc == last + 1 && x > tmpx + 5) ))
|
||||
c = last + 1;
|
||||
#endif
|
||||
else if (vc == row->pos() ||
|
||||
(row->par()->table
|
||||
&& vc <= last && row->par()->IsNewline(vc-1)) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user