强化拖拽校验
This commit is contained in:
parent
9f54bc5ff1
commit
e2bafb16fb
|
@ -69,7 +69,9 @@ void DragHeader::mouseReleaseEvent(QMouseEvent *event)
|
|||
void DragHeader::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
QFrame::mouseMoveEvent(event);
|
||||
if(std::get<0>(this->press_flag)){
|
||||
auto sub = event->pos() - std::get<1>(press_flag);
|
||||
|
||||
if(std::get<0>(this->press_flag) && sub.manhattanLength() > QApplication::startDragDistance()){
|
||||
emit this->adjustRequest(event->pos());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -119,6 +119,7 @@ void SplitWindow::present_remove(split_frame::ViewRes *inst)
|
|||
}
|
||||
else if(inst == view_root){
|
||||
setRoot(nullptr);
|
||||
inst->setParentRes(nullptr);
|
||||
}
|
||||
}
|
||||
void SplitWindow::doRetrieve(split_frame::ViewBase *inst)
|
||||
|
@ -150,10 +151,10 @@ void SplitWindow::doClose(split_frame::ViewBase *inst)
|
|||
|
||||
void SplitWindow::siblingAttach(ViewBase *view, ViewRes *pos, SplitType ori)
|
||||
{
|
||||
auto remains_frm = pos->parentRes();
|
||||
doRetrieve(view);
|
||||
|
||||
auto split_slot = new split_panel::SplitPanel(this, ori);
|
||||
auto remains_frm = pos->parentRes();
|
||||
remains_frm->replaceView(split_slot, pos);
|
||||
|
||||
switch (ori) {
|
||||
|
|
Loading…
Reference in New Issue