git-svn-id: svn://db.shs.com.ru/libs@81 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -31,7 +31,6 @@ void BlockView::_init() {
|
||||
scene_->setSceneRect(-2500, -2500, 5000, 5000);
|
||||
scene_->setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||
scene_->installEventFilter(this);
|
||||
scene_->addItem(&sel_rect);
|
||||
scene_->addItem(&tmp_bus);
|
||||
widget_thumb.setParent(this);
|
||||
//widget_thumb.setAutoFillBackground(true);
|
||||
@@ -369,6 +368,7 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
|
||||
sel_rect.setRect(QRectF(scene_point, me->scenePos()).normalized());
|
||||
if (fmm_drag) {
|
||||
if (mm_ci == 0) {
|
||||
scene_->addItem(&sel_rect);
|
||||
sel_rect.show();
|
||||
if (!mm_mods.testFlag(Qt::ControlModifier))
|
||||
clearSelection();
|
||||
@@ -516,6 +516,8 @@ bool BlockView::eventFilter(QObject * o, QEvent * e) {
|
||||
}
|
||||
}
|
||||
sel_rect.hide();
|
||||
if (sel_rect.scene())
|
||||
scene_->removeItem(&sel_rect);
|
||||
mm_drag = false;
|
||||
mm_ci = 0;
|
||||
unsetCursor();
|
||||
|
||||
Reference in New Issue
Block a user